[Setup] huge performance issues using Diazo

Mikko Ohtamaa mikko+plone at redinnovation.com
Sat Apr 7 10:25:50 UTC 2012


Hi Laurence,

>
> 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)
> and
> 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
> experimental.cssselect.
>
>
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:

https://twitter.com/#!/moo9000/status/181266290458116096


Mikko Ohtamaa
<https://lists.plone.org/mailman/listinfo/plone-setup>
http://opensourcehacker.com
http://twitter.com/moo9000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-setup/attachments/20120407/e2b27e8b/attachment.html>


More information about the Setup mailing list