[Bug 16491] Add simpler and better event registration system

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16491

--- Comment #6 from Glenn Maynard <glenn@zewt.org> ---
I'm not sure if the suggestion is to allow optimizing out the whole event
dispatch, or just the invocation of particular event listeners, but I don't
think either is useful.

I can't easily benchmark how long firing an event from native code takes, but
from JavaScript it's taking about .15ms Firefox and .06ms in Chrome, so
optimizing out the actual firing of the event, even if it was possible, doesn't
seem useful.  (https://zewt.org/~glenn/time-event-dispatch-1.html)

Dispatching an event with 10000 listeners takes 22ms (Chrome) to 25ms (Firefox)
on my system, or about 2uS per handler.  Even in an ugly case with a hundred
keypress handlers on window, one for each key, this doesn't seem like a useful
optimization either.  (https://zewt.org/~glenn/time-event-dispatch-2.html)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 5 January 2013 18:23:40 UTC