W3C home > Mailing lists > Public > wai-xtech@w3.org > December 2008

Re: ARIA should require DOM mutation event support for compliance.

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 09 Dec 2008 16:45:38 -0500
Message-ID: <493EE702.5020600@mit.edu>
To: David Bolter <david.bolter@utoronto.ca>
CC: Aaron M Leventhal <aleventh@us.ibm.com>, wai-xtech@w3.org

David Bolter wrote:
> Since the DOM event model is reentrant and synchronous, this must be
> quite a performance hit for mutation event compliant browsers. Is there
> any larger solution to all this?  I imagine the mutation event engine is
> switched on only when needed, via the lazy instantiation pattern already.

In Gecko, mutation events are only dispatched if there is a listener 
registered for that event.  Of course the check to see if there is a 
listener itself takes some time, so there is some performance penalty if 
a listener is registered anywhere in the DOM tree.  There's a per-window 
bitfield that indicates what listeners are set somewhere in the tree, 
and if all the bits are zero there's basically no performance penalty 
(other than the one branch to check the bits).

I'm not saying there's a better solution in place than mutation events 
right now, just that mutation events are not the only possible solution 
to the problem.

-Boris
Received on Tuesday, 9 December 2008 21:46:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 22 March 2009 03:32:14 GMT