Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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.

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1034590]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2018-05-26 12:23 GMT
Find Nodes?
    Voting Booth?