This subject comes up every now and then - mutation event listeners work, but they're expensive. If we could create a scriptable mutation observer, we could save some processing cycles.
A search on MXR shows this isn't badly needed: http://mxr.mozilla.org/mozilla-central/search?string=addEventListener%28%22DOM&find=\.js$ Aside from tests, the only areas which use mutation listeners are the "places" bookmarkProperties.xul dialog, and the tab previews capability (which appears ifdef'd out right now per bug 465843, but I'm not totally sure of that).
Looks like I spoke too soon: http://hg.mozilla.org/mozilla-central/annotate/c3eec5d6a63a/toolkit/content/widgets/menulist.xml#l238 So any XUL menulist in a non-XUL document would incur this penalty too. I found this by widening my search: http://mxr.mozilla.org/mozilla-central/search?string=addEventListener%28%22DOM&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
Component: DOM: Mozilla Extensions → DOM
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.