Steve Hay wrote: > Clinton Pierce wrote: >> I commented to my own bug report, and a sample structure is attached. >> >> Building Storable 2.18 for 5.6 is going to be really, really tough >> these days on my Windows machine which is where I found the problem. >> If I had a time machine... >> >> On Jan 29, 2008 4:53 AM, Nicholas Clark via RT >> <perlbug-followup@perl.org> wrote: >> >>> On Mon, Jan 28, 2008 at 11:26:34AM -0800, Clinton A. Pierce wrote: >>> >>>> To duplicate a large expat-parsed XML structure (with refs of refs >>>> of refs), >>>> >>>> I'm doing the following: >>>> >>>> >>>> my $temp = Storable::freeze $originalXml; >>>> my $copyXml = Storable::thaw($temp); >>>> >>>> >>>> And by "large" I mean about 8MB when dumped with Data::Dumper. >>>> Under Perl >>>> 5.6 >>>> the "freeze" takes fractions of a second. Under Perl 5.10 it takes >>>> many seconds (between 5-8 seconds). >>> >>> Do you have a sample data structure you can attach? >>> Do you have results for perl 5.8.8? >>> >>> 5.10 comes with Storable 2.18. If you download this from CPAN and >>> build it for 5.6, is it slow? > > I gave this a quick whirl while waiting for something to compile && > link... > > Using the xml attached in the bug report, my 5.10.0 build takes about > 2.7 secs to do the freeze, while my 5.6.2 build takes about 0.9 secs. > Both are using Storable 2.18. > > I also tried a 5.8.8 building Storable 2.16: it takes 2.7 secs again. > > (I'm using VC++ 6.0 on Win XP.) More detail: There is definitely a difference between 5.6.2 and 5.10.0, but a far more significant difference is brought about by using different mallocs: With 5.10.0 the freeze takes about 2.7 secs with the system malloc and 0.03 secs with perl's malloc. With 5.6.2 it takes about 0.9 secs with the system malloc and 0.03 secs with perl's malloc. Not sure why the system malloc figure is slower with 5.10.0, but if the 0.03 secs is more like the time that you were seeing previously, could it be that your 5.6.x build was using perl's malloc and now your 5.10.0 build is using the system malloc? (ActivePerl builds use the system malloc because perl's malloc currently doesn't work with "-D PERL_IMPLICIT_SYS", which is required for the fork() emulation.)Thread Previous | Thread Next