I think nsIScriptEventHandlerOwner could be implemented as a tearoff. It is called quite seldom (which was a bit surprising when I tested it). This reduces the size of nsXULElement. Patch coming.
Created attachment 248261 [details] [diff] [review] proposed patch The interface is really used so rarely that this shouldn't cause perf regressions.
I'm about to open a BeOS-specific bug on this (we're stuck with gcc2.95) but thought I'd ask you if anyone can suggest an easy way to get this patch working for us as well: We get compile errors complaining about mElement->FindPrototypeAttribute and mPrototype being protected in that context, reverting patch solves this, but does anyone know a nice way to fix this?
Reported bug 365118, if anyone can help.