On Fri, May 05, 2006 at 11:03:51AM -0700, Lyle Kopnicky wrote:
> I'm using Data::Dump in a project to periodically write a snapshot of a 
> hash table to disk, so it can be recovered on failure. Unfortunately, it 
> can take 40 seconds to write out a 10,000-entry hash table (each entry 
> is itself a small hash table, one entry of which is itself a small hash 
> table). By writing it to a string first and then to a file, I found that 
> the vast majority of that time is in creating the string, and only 5 
> seconds is in writing the file (using print).
> 
> If I iterate through the table, writing each entry separately to the 
> file, I get a fair improvement. I guess this means that internally, 
> Data::Dump is using a lot of inefficient string appends.
> 
> Nevertheless, I need to get this operation down to 5 seconds, preferably 
> 1 second if possible. Are there modules faster than Data::Dump? What 
> about MLDBM?

I think Storable would be the normal thing to use.

TomP
-- 
-------------------------------------------------------------------------
Tom Pollard                                       [EMAIL PROTECTED]
Schrodinger, Inc.                                    646-366-9555 x102
-------------------------------------------------------------------------

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to