Fix #12436, make delegated events fast again. #923

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@dmethvin
Member
dmethvin commented Sep 6, 2012

This retains the rooted-at-delegateTarget behavior, still needs to be perf tested but I wanted to exercise botio.

Sizes - compared to master 🐘
261698 (+169) dist/jquery.js
92892 (+96) dist/jquery.min.js
33248 (+27) dist/jquery.min.js.gz

@dmethvin
Member
dmethvin commented Sep 6, 2012

/botio test

@jquerybot
Collaborator

From: jQuery Bot.io


Received

Command cmd_test from @dmethvin received. Current queue size: 0

Live output at: http://swarm.jquery.org:8000/64c7151bd6eb444/output.txt

@timmywil timmywil commented on the diff Sep 6, 2012
src/event.js
@@ -393,7 +394,9 @@ jQuery.event = {
sel = handleObj.selector;
if ( selMatch[ sel ] === undefined ) {
- selMatch[ sel ] = jQuery( sel, this ).index( cur ) >= 0;
+ selMatch[ sel ] = handleObj.needsContext ?
+ jQuery( sel, this ).index( cur ) >= 0 :
+ jQuery.find( sel, this, null, [ cur ] ).length;
@timmywil
timmywil Sep 6, 2012 jQuery member

I'm pretty sure these do the same thing

@dmethvin
dmethvin Sep 6, 2012 jQuery member

If they are supposed to, Sizzle has a bug in handling positional selectors. :)

@timmywil
timmywil Sep 6, 2012 jQuery member

Oh, not for combinators, must be POS.

@timmywil
timmywil Sep 6, 2012 jQuery member

ugh

@timmywil
timmywil Sep 6, 2012 jQuery member

woops, didn't see your reply

@jquerybot
Collaborator

From: jQuery Bot.io


Failed

Full output at http://swarm.jquery.org:8000/64c7151bd6eb444/output.txt

Total script time: 19.64 mins

Swarm URL: http://swarm.jquery.org/job/732

Failed running:

grunt --no-color testswarm:c1d6e6b248b3f1059b162379e9292367a6e61565:/usr/local/bin/tools/node-testswarm-config.json
@dmethvin
Member
dmethvin commented Sep 8, 2012

No actual failure to see there, move along.

@dmethvin dmethvin added a commit that closed this pull request Sep 10, 2012
@dmethvin dmethvin Fix #12436, make delegated events fast again. Close gh-923.
Retains the rooted-at-delegateTarget behavior fixed in #12383 by afd717d.
9b67b4c
@dmethvin dmethvin closed this in 9b67b4c Sep 10, 2012
@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@dmethvin dmethvin Fix #12436, make delegated events fast again. Close gh-923.
Retains the rooted-at-delegateTarget behavior fixed in #12383 by afd717d.
535002a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment