http://www.perlmonks.org?node_id=49602

madhatter has asked for the wisdom of the Perl Monks concerning the following question:

I'm using variable persistence with Data::Dumper. Indentation is set to 0. What is up with this? Why does it's CPU/RAM intensity increase exponentially when the it parses two times the logs? I could understand a good several second increase, but this is rediculous. Is there something I'm missing?

Here is the run:

C:\Perl>perl stats.pl 0.0400 Data Loaded 0.4200 Lines Parsed: 10347 0.4210 Data Dumped 0.8810 TOTAL ; Finished Execution C:\Perl>perl stats.pl 0.0400 Data Loaded 1.7620 Lines Parsed: 20337 50.5330 Data Dumped 52.3350 TOTAL ; Finished Execution

.. and the relevant code:

use Data::Dumper; $Data::Dumper::Indent = 0; $encoding = Data::Dumper->Dump( [\%DATA ], [qw(*DATA)]);
%DATA is a hash of hashes of hashes of strings and integers, basically. (heh)

If nothing can be done about this, what sort of (more efficient) alternatives are there? Preferably as simple as dumping to a file and a

do "data.dat";

Thanks,
madhatter