W3C home > Mailing lists > Public > www-style@w3.org > July 2008

Re: CSS Selector Complexity : Working draft document

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 31 Jul 2008 13:58:26 -0700
Message-ID: <48922772.6010502@mit.edu>
To: Francois Remy <fremycompany_pub@yahoo.fr>
CC: CSS 3 W3C Group <www-style@w3.org>

Francois Remy wrote:
> - Loop Complexity (or static complexity: time needed to find matching 
> elements at load time)

As I said in my other mail, this is not an interesting metric for a 
rendering engine (unless you're implementing querySelectorAll).  During 
load time the question that's asked (repeatedly) is not "which elements 
match this selector?" but "which selectors match this element, so that I 
can apply the relevant style rules?"

> - Update Complexity (number of times the matched elements can be 
> reevaluated * time it need)

My previous post broke this down in what I think is a more useful way.

>     * I voluntary excluded the optimizations that can be done by the UA 
> because they are probably not the same

But the space of possible optimizations is in fact key...  The question 
is always what the fastest smallest way is to implement something.

-Boris
Received on Thursday, 31 July 2008 20:59:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:10 GMT