On 16/03/12 22:08, Laurence Rowe wrote:
Are you are running in production mode? bin/instance console rather than
bin/instance fg if you want to run non-daemonised. If you run in debug mode
then the whole theme is compiled down to XSLT every request (so changes in
your theme appear immediately.)

What does your profiling data say for that single request? How much time is
spent in the transformIterable and then how much applying the XSLT itself?
libxslt is generally pretty fast and you generally need a very long document
before you need to worry about optimising your xpaths.

sorry for not answering before, Lawrence, but I was giving a training last week.

I made more tests today after some changes on the rules: we reduced dramatically the time spent on the processing but transformIterable still takes around 2.5s on worst case (adding an Archetype object).

I replaced our theme with some other and the same request shows that transformIterable takes only 0.04s, so we have to work more on it.

Running the XSLT to apply a Diazo theme is usually orders of magnitude
faster than rendering the Plone page to begin with. If you are seeing really
slow rendering and you are sure that the time is being spent applying the
XSLT then you have a couple of options:

1. Simple binary search. Remove half your theme, rerun it and see how long
it takes. If it's taking 30s then you can do that in development mode, even
when compiling the theme every request Diazo should take<  1s. (I would
conside 10-50ms to be normal, but obviously it depends on the complexity of
your theme.)

2. Compile your theme with the standalone Diazo and use xsltproc --timing to
see how long it takes. This is a trivial theme and content document:

$ bin/diazocompiler -r rules.xml -o compiled.xsl
$ xsltproc --timing --repeat --html --noout compiled.xsl content.html
Parsing stylesheet compiled.xsl took 0 ms
Parsing document content.html took 0 ms
Applying stylesheet 20 times took 5 ms

Using the plone.org theme (compiled with an old version of xdv which
produces slightly slower XSLT) against a 563KB page (the source to
http://plone.org/documentation/manual/theme-reference/referencemanual-all-pages)
is

$ xsltproc --html --timing --noout default.xsl
theme-reference-all-pages.html
Parsing stylesheet default.xsl took 1 ms
# lots of warnings about invalid html, they are ignored so don't worry.
Parsing document theme-reference-all-pages.html took 35 ms
Applying stylesheet took 217 ms

(Unfortunately the xsltproc --profile only gives per template statistics
which is not very useful for us.)

we will take a look on this as soon as we can.

thank you for your help.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Setup mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-setup

Reply via email to