Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 641735 - Performance issue with perl-XML-SAX-0.14-8
Performance issue with perl-XML-SAX-0.14-8
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: perl-XML-SAX (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Petr Pisar
Petr Šplíchal
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-10 15:44 EDT by Remi Collet
Modified: 2016-05-31 21:40 EDT (History)
6 users (show)

See Also:
Fixed In Version: perl-XML-SAX-0.14-10
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-13 22:06:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Simple test case (697.27 KB, text/plain)
2010-10-10 15:44 EDT, Remi Collet
no flags Details
Test case (697.27 KB, text/plain)
2011-08-26 07:37 EDT, Petr Pisar
no flags Details
Fix back-ported from 0.96 (2.15 KB, patch)
2011-08-26 08:08 EDT, Petr Pisar
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
CPAN 29316 None None None Never
Red Hat Product Errata RHBA-2011:1446 normal SHIPPED_LIVE perl-XML-SAX bug fix update 2011-11-14 03:02:40 EST

  None (edit)
Description Remi Collet 2010-10-10 15:44:28 EDT
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
Comment 1 Remi Collet 2010-10-10 16:08:24 EDT
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)
Comment 2 Marcela Mašláňová 2010-10-11 03:17:31 EDT
Thanks for your report. Patch looks applicable on RHEL-5 version.
Comment 4 Petr Pisar 2011-08-26 07:37:53 EDT
Created attachment 520073 [details]
Test case

This is stricter version of original test case to prevent unintended here-document expansion.
Comment 5 Petr Pisar 2011-08-26 08:08:00 EDT
Created attachment 520075 [details]
Fix back-ported from 0.96
Comment 7 Petr Pisar 2011-10-06 03:37:47 EDT
    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.
Comment 12 errata-xmlrpc 2011-11-13 22:06:59 EST
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

Note You need to log in before you can comment on or make changes to this bug.