[Setup] huge performance issues using Diazo
mikko+plone at redinnovation.com
Sat Apr 7 10:25:50 UTC 2012
> Actually the whitespace bugfix in lxml I was referring to was something
> else. I've fixed this whitespace issue (and made a pull request to lxml)
> released experimental.cssselect 0.3. Update your version pins.
> With this change I benchmarked the ploneorg theme with a
> css:if-content=".section-foo, .section-documentation" on the root rules
> element against a 20k and 565K documentation page. With the 20K document,
> execution time dropped to ~25ms from ~95ms. With the 565K document, the
> execution time dropped to ~1200ms and did not complete in several minutes
> with the previous version.
> Changing the condition to css:if-content="body.section-foo,
> body.section-documentation" dropped execution time for the 20K document to
> ~7ms and for the 563K document to ~230ms using either the new or old
A very noticeable gain! It might make sense to document this behavior
somewhere, as this is against the conventional wisdom how CSS selectors
work - they are evaluated from right to left and in a browser adding more
specific selector might actually slow down things:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Setup