Bug Tracker

Modify

Ticket #3107 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

Description

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

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

Change History

Changed 5 years ago by flesler

comment:1 Changed 5 years ago by flesler

  • need changed from Review to Commit
  • Owner set to flesler
  • Status changed from new to assigned
  • Priority changed from trivial to minor

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

comment:2 Changed 5 years ago by flesler

  • Status changed from assigned to closed
  • Resolution set to fixed

Applied at [5757]. Thanks.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.