This is very important question for us.
We are trying to determine if the performance of a
transformation is affected by the size and heirarchy of an
XML file.
Yes, of course it is.
That is will there be a performance degradation
when the size of the XML grows and we need to access data
which lies deeper in the heirarchy. What are the exact
reasons performance degrades and how can it be prevented by
good programming? Thanks,
The cost of compiling the stylesheet is constant. Try to reuse the
compiled stylesheet.
The cost of building the tree representation of the source document is
O(n) with the size of the document.
The cost of doing the transformation will usually be O(n) with the size
of the source document, though it is very easy to write code that is
O(n^2) or worse. Find out by running your stylesheet against source
documents of size 100Kb, 200Kb, 400Kb, 800Kb and comparing the elapsed
time.
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list