Description of problem: Using the perl facility "use overload" together with blessing an object to the class of the current module can cause a dramatic slow-down of Perl scripts executed under Fedora 7. This problem does not occur with the identical Perl release under SUSE Linux 10.2. A similar problem may also exist under Fedora Core 6. Version-Release number of selected component (if applicable): $ rpm -q perl perl-5.8.8-18.fc7 $ perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: [...] Compiled at May 16 2007 23:23:14 How reproducible: Easily and reliably reproducible. Steps to Reproduce: 1. Save the test script --------------------------------------------------- #!/usr/bin/perl use overload q(<) => sub {}; my %h; for (my $i=0; $i<50000; $i++) { $h{$i} = bless [ ] => 'main'; print STDERR '.' if $i % 1000 == 0; } --------------------------------------------------- as an executable file "stour-test.pl". 2. Type $ time ./stour-test.pl and the program will print 50 dots. The program should complete in less than 1 second, but takes much longer under Fedora 7. Actual results: On a Fedora 7 installation: real 1m40.613s user 1m40.273s sys 0m0.194s On a SUSE 10.2 installation: real 0m0.372s user 0m0.344s sys 0m0.020s Both machines use identical hardware (1.4 GHz AMD Athlon, 1 GB RAM, same motherboard). The runtimes under Fedora 7 become similar to those under SUSE 10.2 if either - the "use overload" line is uncommented - the string 'main' is changed to 'main1' Expected results: The runtime under Fedora 7 should be about 270x faster, similar to the one achieved under SUSE 10.2 or with one of the above two modifications. There is no reason, why loading "use overload" or changing the class into which we bless the object should affect the runtime so dramatically. Both Fedora 7 and SUSE 10.2 use Perl 5.8.8, so I strongly suspect that something in the way the Fedora 7 Perl package has been prepared is causing this problem.
Should be fixed in perl-5.8.8-22.fc8 or later This duplicates Bug#196836
Markus, can you try a perl later than perl-5.8.8-22 from fedora's rawhide to see if that fixes your problem? I can probably backport the fix to F7 if you want. I'd like to hear that the fix for bug#196836 actually fixes the problem first though.
I've rebuilt perl-5.8.8-28.3 package on a Centos system. The test script above works much quicker now, and real applications built on Catalyst and DBIx-Class (which both tickle this bug) are much nippier. Not tested on F7 explicitly
Fixed also in F-7.