http://qs321.pair.com?node_id=11136382


in reply to Multi threading a

First, you should compare the processing time of decompressing and recompressing the file without Perl in between:

time (gunzip -cd "$file" | gzip /tmp/newfile)

If that is already slow, you might gain some time by using the pigz tool, which uses multiple cores for decompressing and compressing.

If that is still fast, the processing you do in Perl is the bottleneck and you will need to find ways to make your Perl code faster.