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

Storable doubles memory consumption when storing

Thread Next
From:
Richard Jelinek
Date:
May 14, 2004 13:10
Subject:
Storable doubles memory consumption when storing
Message ID:
20040514211002.A21640@petamem.com
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
simple

  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 - www.petamem.com -
		       -= 3394928 Mind Units =-

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About