RE: [xsl] [xslt performance for big xml files]

Subject: RE: [xsl] [xslt performance for big xml files]
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 26 Apr 2009 21:43:34 +0100
> 1> On splitting my 30 MB to 60 splits, I was able to get a massive
> speed up. Overall transformation happening under 3 min.
> 2> Did some code level optimization (standard ones, avoiding non
> essential computations.). Got a massive improvement here too. 
> Tried to avoid call-templates where ever possible. Replaced 
> my loops with apply-templates. eliminated usage of // totally.


I think there's a flaw in the logic here. Your problem is not one of
insufficient memory, so you don't need to split the file for memory reasons.
The fact that it is possible to do the transformation "one subtree at a
time", proves that the logic is essentially linear, and it should therefore
be possible to do it in linear time without splitting the file into
subtrees. You don't need to do the splitting, you only need to fix the part
of your code that is making the performance non-linear.

Michael Kay
http://www.saxonica.com/

Current Thread