W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2011

Re: [Events] A case where on* attributes are required

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 23 Dec 2011 19:17:47 -0500
Message-ID: <4EF51A2B.2060701@mit.edu>
To: Ojan Vafai <ojan@chromium.org>
CC: David Bruant <david.bruant@labri.fr>, www-dom@w3.org
On 12/23/11 2:09 PM, Ojan Vafai wrote:
> We could limit the performance impact by restricting to simple
> selectors. But that wouldn't completely address the performance issues
> and it would limit a lot of useful things you can do with this API.

If we restrict to just element IDs, and in particular to attaching to 
the first element with the given id, I think the performance impact 
becomes pretty close to nil (at least in Gecko).  I'm not sure how much 
of a problem that ends up being in practice, though.

> I'm curious what other browser developers think. Could this be done
> without significant performance impact?

That depends on how much the API is used, right?

If it's just a few selector-matching operations per mousemove or 
whatnot, that's not that bad performance-wise.... until people start 
writing crazy selectors.

-Boris
Received on Saturday, 24 December 2011 00:18:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT