Bug Tracker

Opened 15 years ago

Closed 15 years ago

#3107 closed enhancement (fixed)

Global Event Triggering Performance Enhancement

Reported by: mike.helgeson Owned by: flesler
Priority: minor Milestone: 1.3
Component: event Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:


In my opinion the jquery core should not ever call jQuery("*") internally.

After investigating this unloading issue, 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 );

Attachments (1)

global-trigger[5756].diff (580 bytes) - added by flesler 15 years ago.

Download all attachments as: .zip

Change History (3)

Changed 15 years ago by flesler

Attachment: global-trigger[5756].diff added

comment:1 Changed 15 years ago by flesler

need: ReviewCommit
Owner: set to flesler
Priority: trivialminor
Status: newassigned

I modified the code a bit, it wasn't right.

comment:2 Changed 15 years ago by flesler

Resolution: fixed
Status: assignedclosed

Applied at [5757]. Thanks.

Note: See TracTickets for help on using tickets.