Re: [css-variables] Using $foo as the syntax for variables

On 5/25/12 10:25 AM, Marat Tanalin | tanalin.com wrote:
> BTW, browser vendors (WebKit [2], Mozilla [3]) already take steps to make selectors much faster and, in most cases, independent from how long selector is.

There's no free lunch.

The optimizations you link to have a nontrivial memory cost, and worse 
yet make it much harder to perform selector matching in a parallelizable 
manner (because it becomes stateful).

UAs are sort of forced to do them because sites are using descendant 
combinators willy nilly (not least because CSS preprocessors output them 
all over the place)...

Long selector chains can still cause performance issues when trying to 
handle dynamic changes, by the way, where the optimizations you link to 
don't apply right now.

-Boris

Received on Friday, 25 May 2012 15:00:38 UTC