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.

Replies are listed 'Best First'.
Re^2: Multi threading a
by dnamonk (Acolyte) on Sep 02, 2021 at 22:33 UTC
    Yeah, that's true. The issue is with zipping module. Otherwise the program is 20x faster