[Kss-devel] getHtmlIdSelector and cssQuery speed issues

Hedley Roos hedley at upfrontsystems.co.za
Thu Apr 5 11:31:48 CEST 2007


> The thing that I don't understand is, that getHtmlIdSelector has nothing 
> to do with cssQuery, and I don't see how they relate.

You are right - it has nothing to do with it.

Only two places in azax relate to cssQuery: resourcedata.js and 
selectorreg.js.
I have found that mergeForSelectedNodes in resourcedata.js does some 
kind of
two-pass sweep. It calls kukit.dom.cssQuery twice
the number of times as the number of defined KSS rules. That is the 
expected bahaviour.

But getHtmlIdSelector or something triggers some other state which 
results in repeated calls to cssQuery (the packed one that ships with 
kukit). I don't think it is your code that is responsible for that but 
rather something in CMFPlone. Two days of research and I'm still 
struggling to find a solution. I now do my testing on the 
plone_control_panel page since it is usually the same accross Plone 
installations.

I'm about to replace the packed cssQuery with the unpacked one so that 
Firebug can give better feedback (the eval in cssQuery.js obfuscates the 
function name in Firebug). Then  I'll compare a non-azax Plone with an 
azax Plone and post the Firebug profiles.


More information about the Kss-devel mailing list