🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@SaptakS
Copy link
Contributor

@SaptakS SaptakS commented Dec 27, 2017

For both simple and complex selectors, use direct filter in winnow

Summary

As show here, the only-intersection implementation has an overall poor performance in all scenarios, and the direct implementation is equal or better than the branching implementation. Also it simplifies the code.
Hence, we can just use the direct filter implementation for both simple and complex selectors.

Checklist

Copy link
Member

@dmethvin dmethvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, per the discussion in gh-3272.

return jQuery.grep( elements, function( elem ) {
return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;
} );
// Filtered directly for both simple and complex elements
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: simple and complex selectors, not elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

For both simple and complex selectors, use direct
filter in winnow

Closes jquerygh-3272
@Krinkle
Copy link
Member

Krinkle commented Jan 10, 2018

Looks like the Travis CI build is testing due to travis-ci/travis-ci#8836.

https://travis-ci.org/jquery/jquery/jobs/327104673

10 01 2018 05:37:48.483:INFO [launcher]: Trying to start ChromeHeadless again (2/2).
10 01 2018 05:37:48.835:ERROR [launcher]: Cannot start ChromeHeadless
10 01 2018 05:37:48.835:ERROR [launcher]: ChromeHeadless stdout: 
10 01 2018 05:37:48.835:ERROR [launcher]: ChromeHeadless stderr: 
[0110/053748.618950:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper
binary was found, but is not configured correctly. Rather than run without sandboxing
I'm aborting now. You need to make sure that /opt/google/chrome/chrome-sandbox is
owned by root and has mode 4755.
Failed to generate minidump.

@SaptakS
Copy link
Contributor Author

SaptakS commented Jan 15, 2018

@Krinkle According to travis-ci/travis-ci#8836 (comment) we can either make sudo: required in the travis build config, or use --no-sandbox to fix this issue. I am not exactly sure whether that is suggested and if that is the permanent solution from travis

@SaptakS SaptakS closed this Jan 17, 2018
@SaptakS SaptakS reopened this Jan 17, 2018
@timmywil timmywil closed this in 4765bb5 Jan 17, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants