Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Multi threading a

by Corion (Patriarch)
on Sep 02, 2021 at 20:20 UTC ( [id://11136382]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136382]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-18 13:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found