in reply to Re^6: Script exponentially slower as number of files to process increases
in thread Script exponentially slower as number of files to process increases

Because $subdir doesn't reset to 0 after the 256th fork as in the OP script, which is incidentally the $subdircount value.
  • Comment on Re^7: Script exponentially slower as number of files to process increases