RE: XML::Xalan, Perl modules and bootstrapping... :-s

2002-07-05 Thread Jim Morrison [Mailinglists]

[Marked with  ] 


 #
 Terminating inside exit handler..
 Inside terminate()..
 #

This is bad. Modules should not warn unless you ask them for debugging
information.




--
Hmm... I wonder...
Snip from XML::Xalan...

##
my $CHILD_EXIT_HANDLER_INSTALLED = 0;

if ($ENV{MOD_PERL}) {
unless ($CHILD_EXIT_HANDLER_INSTALLED) {
Apache-push_handlers(
PerlChildExitHandler = sub {
print STDERR Terminating inside exit handler..\n;
XML::Xalan::Transformer::terminate();
});
++$CHILD_EXIT_HANDLER_INSTALLED;
}
}

END {
unless ($ENV{MOD_PERL}) {
print STDERR Terminating..\n;
XML::Xalan::Transformer::terminate();
}
}
#

Perhaps I should remove the two offending print STDERR 's ..  I think
the someone may have put them in while they were helping me install it..

The question though, really, is why am I getting considerably more than
usual?  Ideally, XML::Xalan should be built each httpd??? Which would
explain the numbers I was getting before (about one message per httpd)
.. The fact that I am getting 10 per httpd now... ??
-







 Which seem to come from Xalan.. .. I now get fifty of them.. And then
a
 dozen or so:

 #
 Attempt to free unreferenced scalar.
 #

This is caused by a bug in the XML::Xalan module. I do not know what
that
bug is, because I do not know why people use XML::Xalan, apart from the
association with Apache.

This has nothing whatsoever to do with where you use the module - you
would have stumbled across this bug anyway eventually.

The alternative is to us XML::LibXML, which is probably better supported
and faster and easier to use anyway.





-

Interesting you should say that?  I was under the impression that the C
version of Xalan was very quick?  I am, in some cases running off 100 or
so transformations in one run, through quite complicated xslt's and
despite the fact that for every transformation my dodgy perl code builds
the XML from collections of flat xml files on disk, which then has to
get parsed.. (and in many cases more XML is brought in through
document()...   I'm still getting a good 800 - 900 pages per minute..
(on a little 500Mhz Celeron, 256Mb)

Would LibXML perform better you think??  Is there somewhere I can find a
comparison??

Cheers,

Jimbo




Re: XML::Xalan, Perl modules and bootstrapping... :-s

2002-07-05 Thread Matt Sergeant

Jim Morrison [Mailinglists] wrote:
 [Marked with  ] 

(Try a real mail client ;-)

 Interesting you should say that?  I was under the impression that the C
 version of Xalan was very quick?  I am, in some cases running off 100 or
 so transformations in one run, through quite complicated xslt's and
 despite the fact that for every transformation my dodgy perl code builds
 the XML from collections of flat xml files on disk, which then has to
 get parsed.. (and in many cases more XML is brought in through
 document()...   I'm still getting a good 800 - 900 pages per minute..
 (on a little 500Mhz Celeron, 256Mb)
 
 Would LibXML perform better you think??  Is there somewhere I can find a
 comparison??

Yes, LibXML and LibXSLT are faster, simply because the underlying 
libxml2 and libxslt processors are the fastest there are available - I 
think some people's tests now show them to be faster even than 
Microsoft's (which was always the benchmark to beat).

I do still wonder why people get the impression you were given - it's 
widely known that the C version of Xalan is appallingly slow - slower 
even than it's Java counterpart.

Matt.




Re: XML::Xalan, Perl modules and bootstrapping... :-s

2002-07-05 Thread Emmet Caulfield

On Fri, 5 Jul 2002, Matt Sergeant wrote:

 I do still wonder why people get the impression you were given - it's
 widely known that the C version of Xalan is appallingly slow - slower
 even than it's Java counterpart.

Now that's slow! I haven't benchmarked the available XSLT processors in a
while, and the last time I did, I didn't include Xalan-C because it was
only available via an enormous http download. I did find that libxslt was
a good bit (maybe 50%) faster than Sablotron, and IIRC about 65 times
faster than Xalan-J.

In fairness, my test was probably biased against Java, in that there were
about 100 individual invocations of the command-line utilities.

Regards,

Emmet.


--
$_=Just another Perl hacker\n;###  [EMAIL PROTECTED]  ###
$u=sub{unpack$_[0],$_[1]};sub _{$u('c',shift)};if(open O,|-){for(split''){$,
=_($_)-_($,);print O+($,0?'++':'--')x abs($,).\n;$,=$_}close O}else{$,=_ $,;
for(){$_=join('$,;',$u('A2'x(.5*length),$_)).'$,';print pack'c',eval}}