W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: QSA, the problem with ":scope", and naming

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 19 Oct 2011 10:47:20 -0400
Message-ID: <4E9EE2F8.2070804@mit.edu>
To: Anne van Kesteren <annevk@opera.com>
CC: Alex Russell <slightlyoff@google.com>, public-webapps@w3.org
On 10/19/11 4:29 AM, Anne van Kesteren wrote:
> On Wed, 19 Oct 2011 17:22:46 +0900, Alex Russell
> <slightlyoff@google.com> wrote:
>> Yehuda is representing jQuery. I'll take his opinion as the global
>> view unless he choses to say he's representing a personal opinion.
>
> You misunderstand. Boris is contrasting with CSS.

No, I'm talking purely about querySelector.  The fact that at least 
Gecko and WebKit implement querySelector in a braindead way because that 
lets them reuse their selector matching code is a somewhat separate 
kettle of fish.

What we're discussing her, in particular, are optimizations that make 
use of the differences in use case between CSS selector matching (match 
one node to a bazillion selectors) and querySelector (match one 
selectors to possibly a bazillion nodes).  There are ways to optimize 
the latter by examining the structure of the selector and making use of 
existing cached information in the browser that make no sense in the CSS 
context and would be implemented as a preprocessing pass before falling 
back on actual selector matching.  WebKit does a few of these, of 
varying utility.  I've considered doing some in Gecko, but again want to 
have hard data that they're actually needed before adding complexity.

-Boris
Received on Wednesday, 19 October 2011 14:48:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT