[Kss-devel] getHtmlIdSelector and cssQuery speed issues

Hedley Roos hedley at upfrontsystems.co.za
Mon Apr 2 11:24:15 CEST 2007


I have a script which does ten calls to getHtmlIdSelector and then 
subsequent ksscore.replace(Inner)HTML's.

According to firebug the cssQuery function gets called 197764 times. It 
is extremely slow. When I modify the script to only do two 
getHtmlIdSelector's cssQuery gets called 23858 times. The rest of the 
javascript functions use less than 2% of the execution time.

So, why does this happen? cssQuery does not seem to slow by itself. It 
is the number of times is gets called that hurts my browser.

My current workaround is to update larger parts of the page than needed, 
thereby reducing the number of getHtmlIdSelector's at the expense of 
sending more data back to the client.


More information about the Kss-devel mailing list