just to let you know how we reduced the process time from 25 to 2.5 seconds: we changed most conditional rules from CSS3 to XPath selectors.

here is an example:

-    <rules css:if-content=".template-section-view,
-                           .template-opinion-view,
-                           .template-opinion-interview-view,
-                           .template-opinion-context-view">
+    <rules if-content="//*[contains(@class, 'template-section-view')] or
+                       //*[contains(@class, 'template-opinion-view')] or
+ //*[contains(@class, 'template-opinion-interview-view')] or + //*[contains(@class, 'template-opinion-context-view')]">

Diazo documentation states that: "CSS selectors are replaced by the equivalent XPath selector during the pre-processing step of the compiler. Thus, they have no performance impact."

this seems to be false according to what we have found.

I would love to give you more information on this, but the guy who actually wrote the rules is a little bit busy right now.

it would be great to have some sort of tool to test performance for rules files before deployment.

Héctor Velarde

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