develooper Front page | perl.perl5.porters | Postings from May 2004

Storable doubles memory consumption when storing

Thread Next
Richard Jelinek
May 14, 2004 13:10
Storable doubles memory consumption when storing
Message ID:
Hi there,

we use the Storable module in a very basic way for exactly the
primordial purpose it was written for.

given a somewhat bigger data structure, let's say a 1.4GB large hash
containing some strings as keys and some objects as values, when a

  store $self, $file;

is issued ($self is reference to the hash), we see a doubled increase
of memory usage. I.e. the process' vsize then being about 2.8GB. As
you may imagine this is not funny.

When retrieving the data, all behaves well and normal. Memory
consumption is as expected.

Is there any reason why store grabs that much memory? Looks like if a
clone of the data structure would take place in memory.

best regards,

     Dipl.-Inf. Richard Jelinek

     - The PetaMem Group - Prague/Nuremberg - -
		       -= 3394928 Mind Units =-

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About