Skip to content

Update optimize-selectors.md #650

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

Conversation

adardesign
Copy link

No description provided.


```
$("[attributeKey=value]"); // Extremely expensive.
$("input[attributeKey=value]");; // Better.
Copy link
Member

Choose a reason for hiding this comment

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

two semicolons

Copy link
Author

Choose a reason for hiding this comment

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

Fixed!

@arthurvr
Copy link
Member

Could you please sign the CLA?

@arthurvr
Copy link
Member

Could you take a look at #106? I'd love to include a part about attribute selectors, but there are some more things we need to touch. That said, could you update the examples to use our style guide?

@arthurvr
Copy link
Member

arthurvr commented May 1, 2015

Hey @adardesign, are you interested in finishing up this PR? You still need to sign the CLA and address some comments.

@adardesign
Copy link
Author

Yes, Ill get to it shortly

@arthurvr
Copy link
Member

Hey-hey @adardesign still interested?

@arthurvr
Copy link
Member

Friendly ping @adardesign. Don't forget about the CLA too.

@arthurvr
Copy link
Member

bump @adardesign

@AurelioDeRosa
Copy link
Member

Hi @adardesign. Are you still interested in this PR?

@AurelioDeRosa
Copy link
Member

Thinking at this PR again, I think it isn't relevant anymore. From a long time jQuery uses querySelector in supporting browsers which is able to deal with the attribute selector. So, it isn't expansive as it used to be. I reckon this PR can be closed. Any thoughts?

@AurelioDeRosa AurelioDeRosa self-assigned this Mar 13, 2016
@dmethvin
Copy link
Member

Agreed, querySelectorAll is generally fast enough and if there are performance issues it would be better to diagnose a slow page than to attempt premature optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants