Re: [xml] Deep-copy of xsltStylesheetPtr?



On Sat, 18 Sep 2004, Daniel Veillard wrote:
Well sure, caching the result is always best :-) , it's unclear from
your test how much the stylesheet load/compilation is, trying to use
a read-only stylesheet from the cache at least as an experiment would be
interesting too.

Some direct measurements:

Loading data.xml doc  0.621080398559 ms.
Loading data.xsl doc  0.472068786621 ms.
Compiling stylesheet  0.223159790039 ms.
Applying stylesheet   0.448942184448 ms.
dump_mem              0.166893005371 ms.

And if I make the data.xml file 50k instead of 1k while keeping data.xsl
the same I get:

Loading data.xml doc  5.368947982788 ms.
Loading data.xsl doc  0.576972961425 ms.
Compiling stylesheet  0.231027603149 ms.
Applying stylesheet  12.245893478394 ms.
dump_mem              9.248018264775 ms.

-rw-r--r--  1 root  wheel  1142  Jul 19 17:17 data.xml
-rw-r--r--  1 root  wheel   831  Jul 19 17:17 data.xsl
-rw-r--r--  1 root  wheel  51367 Sep 18 16:01 data_big.xml

We are dealing with rather small numbers here so they float a bit, but
loading the docs is obviously dependant on the size of them and it looks
like, at least for a small stylesheet, compiling it is about half the time
of loading its doc.

-Rasmus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]