Skip Menu |

This queue is for tickets about the XML-Parser CPAN distribution.

Report information
The Basics
Id: 13420
Status: resolved
Priority: 0/
Queue: XML-Parser

People
Owner: Nobody in particular
Requestors: at [...] altlinux.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.34
Fixed in: (no value)



Subject: support for XSLoader
Please add support for XSLoader. XSLoader is noticeably faster than DynaLoader. With DynaLoader: perl -MXML::Parser -e1 0,24s user 0,03s system 96% cpu 0,280 total perl -MXML::Parser -e1 0,25s user 0,02s system 96% cpu 0,279 total perl -MXML::Parser -e1 0,25s user 0,02s system 96% cpu 0,280 total With XSLoader: perl -MXML::Parser -e1 0,23s user 0,00s system 97% cpu 0,235 total perl -MXML::Parser -e1 0,22s user 0,01s system 97% cpu 0,235 total perl -MXML::Parser -e1 0,22s user 0,01s system 97% cpu 0,235 total --- XML-Parser-2.34/Expat/Expat.pm- 2003-08-19 00:50:10 +0400 +++ XML-Parser-2.34/Expat/Expat.pm 2005-06-26 06:29:09 +0400 @@ -7,9 +7,6 @@ $have_File_Spec); use Carp; -require DynaLoader; - -@ISA = qw(DynaLoader); $VERSION = "2.34" ; $have_File_Spec = $INC{'File/Spec.pm'} || do 'File/Spec.pm'; @@ -26,7 +23,15 @@ } -bootstrap XML::Parser::Expat $VERSION; +eval { + require XSLoader; + XSLoader::load('XML::Parser::Expat', $VERSION); + 1; +} or do { + require DynaLoader; + local @ISA = qw(DynaLoader); + bootstrap XML::Parser::Expat $VERSION; +}; %Handler_Setters = ( Start => \&SetStartElementHandler, End of patch -- Alexey Tourbin ALT Linux Team
Ticket migrated to github as https://github.com/toddr/XML-Parser/issues/34