in reply to Best Practices for Uncompressing/Recompressing Files?

The best practice is to not recompress. As someone else mentioned, your quickest / easiest / cheapest fix is to not alter your machine or your Perl environment, but your algorithm. Re-compressing your file is an unnecessary waste. At worst, uncompress a COPY of the compressed file, process it, then throw it away. Do it in /tmp, or not in /tmp, whatever works best for you. Just don't recompress everything.

After that, you must know your system bottleneck before you can decide what else to change. Threading may or may not be a good idea.

BTW, the "system" call always waits for the process to terminate. So your idea won't work. But, if you are not recompressing as the last step, it doesn't really matter. :)

  • Comment on Re: Best Practices for Uncompressing/Recompressing Files?