Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: IO::Uncompress::Gunzip to scalar takes hours (on windows)

by Corion (Pope)
on May 21, 2013 at 19:44 UTC ( #1034590=note: print w/ replies, xml ) Need Help??


in reply to IO::Uncompress::Gunzip to scalar takes hours (on windows)

If this is ActiveState Perl built with VC6, I remember some bad (re)allocation behaviour of the runtime memory allocator. Maybe the decompressor reallocates the buffer quite often and triggers the bad behaviour.

A potential workaround could be to presize the buffer:

$cleartxt= " " x 100_000; # or whatever you expect; $cleartxt= ''; gunzip ...

Super Search for a post by BrowserUk somewhere in such a thread could unearth more information.


Comment on Re: IO::Uncompress::Gunzip to scalar takes hours (on windows)
Download Code
Re^2: IO::Uncompress::Gunzip to scalar takes hours (on windows)
by cmv (Chaplain) on May 22, 2013 at 11:57 UTC
    I tried this quickly last night, but it didn't seem to make any difference. I'm hoping to profile it to see what is really going on. If I can get to that soon, I'll post the results.

    This still may be the issue, but maybe I just didn't preallocate enough.

    Thanks ++Corion

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2014-12-21 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (109 votes), past polls