xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott_B...@lotus.com
Subject Re: More on problem of transform that is taking too long.
Date Thu, 02 Nov 2000 02:27:50 GMT

Steve Cohen <SteveC@ignitemedia.com> wrote:
> This is the line that appears to be the performance-killer:
>         <xsl:variable name="months"
> select
> r_and_month" />

Steve, backwards traversal in XalanJ1's DTM is not very good.  It was a
design comprimise we made which is biting you.  In addition, in Xalan1,
this particular expression (preceding-sibling::game/year_and_month) has to
go backwards all the way, and search each child list, in order to discover
the non-existence.  In XalanJ1, it will search all the way no matter what,
in XalanJ2 it can stop if it finds one.  And it has to do it for each
"game" element, so the results will be rather nasty in terms of performance
(n-squared at least).

It would be interesting for you to try and run the same transformation with
the Xalan2 alpha.  I'm not sure what the results will be, they might be
better or worse.  XalanJ2 is much better at backwards traversal, but the
preceding-sibling axes isn't necessarily optimized yet.

I can't think of a way to re-code this off the top of my head, though
someone else may have a good idea.

If you want to pass me the stylesheet and xml, I would be happy to do some
performance analysis in XalanJ2 next week (this week is booked), and try
and make this fast.  It's an interesting case.  I would rather not look for
optimization solutions in XalanJ1 at this point.


View raw message