in reply to Re^3: In need of a Dumper that has no pretentions to being anything else.
in thread In need of a Dumper that has no pretentions to being anything else.
Okay. Try this:
#! perl -slw use strict; use Data::Dumper; my %h; $h{ $_ } = [ 1 .. 10 ] for 'aaaa' .. 'zzzz'; print Dumper \%h;
Add whatever Dumper options you like. Prior to the Dump, this hash with somewhat under 500,000 keys and a smallish array for each value consumes ~ 177 MB of ram.
Attempting to dump it pushes that memory consumption (transiently on Win32) to well over 700 800 MB (and still going and consumption still climbing after 1/2 3/4 hour!).
My real hash has close to a million keys and nested arrays. It consumes over 500 MB to start with. Trying to dump it blows 2GB of virtual memory before it crashes Perl--and the time taken even before swapping starts is measured in the half-lifes of Plutonium. I'd like to avoid both. I just need to be able to dump the structure to a file. Preferably in a reasonably compact format.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: In need of a Dumper that has no pretentions to being anything else.
by fergal (Chaplain) on Feb 23, 2005 at 04:19 UTC | |
by BrowserUk (Patriarch) on Feb 23, 2005 at 05:10 UTC | |
by fergal (Chaplain) on Feb 23, 2005 at 06:03 UTC | |
by BrowserUk (Patriarch) on Feb 23, 2005 at 06:31 UTC | |
by jplindstrom (Monsignor) on Feb 23, 2005 at 21:22 UTC |