Subject: Re: [xsl] Performance From: Daniel Veillard <daniel@xxxxxxxxxxxx> Date: Thu, 13 Sep 2001 13:26:39 +0200 |
On Thu, Sep 13, 2001 at 10:40:59AM +0100, Richard Mitchell wrote: > What is the best way to improve performance? A very generic answer is: 1/ find the time consuming parts 2/ change the algorithms associated to those parts that's usually the best practice for any compiled language, once you have running code (i.e. past the design phase). People tend to say that 80% of the time is spent in 20% of the code on more classical languages and my experiences for XSLT are actually similar, 1/ still applies. 2/ is understanding better what the problem is and picking the best algorithm for the job, usually changing the way some complex XPath expressions are designed to minimize the distance searched in the tree can provide dramatic performances improvements. For 1/ I use the --profile option of xsltproc, there is probably other tools for profiling stylesheets. ----------- example ----------------------- orchis:~/XSLT/tests/xmlspec -> ../../xsltproc/xsltproc --profile --noout ./REC-xml-2e.xsl ./REC-xml-20001006.xml number match name mode Calls Tot 100us Avg 0 prod 83 75103 904 1 p 343 27092 78 2 href.target 687 16623 24 3 termref 209 15192 72 4 lhs 83 13006 156 5 rhs 96 12498 130 6 div2 32 9497 296 7 termdef 69 9174 132 8 caption | col | colgroup | table | tbody | td | tfoot | th | thead | tr 114 8028 70 9 nt 318 6237 19 10 spec 1 6140 6140 11 body 1 6016 6016 12 vc 32 5785 180 [...] ---------------------------------------------- Daniel -- Daniel Veillard | Red Hat Network http://redhat.com/products/network/ veillard@xxxxxxxxxx | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Performance, Michael Kay | Thread | [xsl] Display an Xml file in a wind, Cecilia Saltori |
RE: [xsl] Ampersand in url, Michael Kay | Date | Re[2]: [xsl] correct use of keys?, Kevin Burges |
Month |