Created attachment 452609 [details] Simple test case With the simple test attached, we notice really big perfomance issue when parsing large input which seems related to https://rt.cpan.org/Public/Bug/Display.html?id=29316 This issue is not present with more recent version ***** Test on Fedora 14 (perl-XMl-SAX-0.96-10) # yum install perl-XML-Simple $ time perl testxml.pl Request length : 714002 Parsed length : 15 real 0m0.829s # yum install perl-XML-SAX $ time perl testxml.pl Request length : 714002 Parsed length : 15 real 0m16.643s ***** Test on Red Hat Enterprise Linux 5.5 # yum install perl-XML-Simple $ time perl /tmp/testxml.pl Request length : 713976 Parsed length : 16 real 0m0.890s # yum install perl-XML-SAX $ time perl /tmp/testxml.pl Request length : 713976 Parsed length : 16 real 9m20.425s
Of course, in the attached test case, the line $XML::Simple::PREFERRED_PARSER = 'XML::Parser' Should be removed... (this is a workround to this issue)
Thanks for your report. Patch looks applicable on RHEL-5 version.
Created attachment 520073 [details] Test case This is stricter version of original test case to prevent unintended here-document expansion.
Created attachment 520075 [details] Fix back-ported from 0.96
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause Parsing long XML document through XML::Simple API if XML::SAX parser implementation is available. Consequence The parser running time is unacceptably long. Fix XML::SAX parser copied XML string on each token match. More efficient handling of consequent reading has been back-ported. Result Long XML documents are parsed in reasonable time.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1446.html