Bug Tracker

Ticket #8790 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Optimize non-attached events such as data events

Reported by: dmethvin Owned by: dmethvin
Priority: blocker Milestone: 1.6
Component: event Version: 1.5.2
Keywords: Cc:
Blocking: Blocked by:


Currently when an event is triggered we always bubble it up the tree to the document/window even if we have never bound an event for it. For the case where we know it's not a native event (and thus cannot/should-not have inline handlers, jQuery.event.trigger should check bail out immediately. The easiest way to do this is probably an event name whitelist for now.

During the event rewrite I looked into keeping a count of *active* event attaches (rather than just non-virgin event names) but it was just too unreliable even after accounting for cloneCopyEvent etc. Counts may become impossible anyway if we start attaching data directly to elements and let them clean up after themselves.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Owner set to dmethvin
  • Priority changed from undecided to blocker
  • Status changed from new to assigned
  • Component changed from unfiled to event
  • Milestone changed from 1.next to 1.6

comment:2 Changed 4 years ago by dmethvin

  • Type changed from bug to enhancement

comment:3 Changed 4 years ago by john

comment:4 Changed 4 years ago by john

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


Note: See TracTickets for help on using tickets.