xsl-list
[Top] [All Lists]

Re: [xsl] measuring performance of XSLT stylesheet

2009-11-16 15:24:15
Thank you so much for all your tips.

Additionally, are there any particular tags that I must be avoiding to
improve performance?

I know using "//" is not advisable. Any other tags that I should be avoiding?

On Mon, Nov 16, 2009 at 1:34 PM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:

Any tips on improving performance will also be helpful.

To state the obvious, you should measure using the processor,
stylesheet, and data that you will be using in real life.
They will affect the outcome far more than will any
generalisations that we can give.

Tony has given the most important piece of advice without actually spelling
it out: concentrate on measuring and understanding the performance you are
getting, and the improvements will follow naturally. Never try to make
improvements until you have a measurement framework in place. Expect to
spend 90% of your effort on measuring performance and 10% on improving it.

Some tips on measurement:

(a) make sure you distinguish/discount Java VM warmup time, stylesheet
compilation time, document parsing/building time, transformation time, and
serialization time. Any or all of these components may be of importance to
you, but some of them can probably be discounted in production applications,
so you need to discount them in your measurements.

(b) if you're going to measure Saxon from the command line, use the -t and
-repeat options, as well as -TP for profiling.

(c) measure with different source document sizes and plot how performance
varies with document size. This tells you a lot about the performance
characteristics of your code. If the performance is quadratic, look for
expensive predicates and try to replace them with keys.

(d) use metrics that relate to your performance requirements, so you know
when to declare success.

Regards,

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





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--