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

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.


Received on Tuesday, 9 December 2008 21:46:25 UTC