global events

global events


I don't know if anyone has experienced a performance issue with global
event triggering, but in my opinion the jquery core should not ever
call jQuery("*") internally.
After investigating this unloading issue:
http://dev.jquery.com/ticket/2698
http://groups.google.com/group/jquery-dev/browse_thread/thread/bdb96e4c77c6cf79#
...I noticed another potential bottleneck with the global event
triggering on line 1985 in 1.2.6 (uncompressed)
jQuery("*").add([window, document]).trigger(type, data);
I think this should be replaced by:
jQuery.each( jQuery.cache, function(){
if ( this.events && this.events[type] )
jQuery.trigger( type, data, this.handle.elem, true );
});
Opinions?