Skip to content
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

Optimize object strip case #1393

Merged
merged 1 commit into from
Sep 11, 2022
Merged

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Sep 8, 2022

Refs #205

This skips the check for extra keys in the default case of strip being the object parsing strategy, because we don't use the extra keys.

This yields a pretty modest performance bump - about 5% in the realworld case in my testing.

@netlify
Copy link

netlify bot commented Sep 8, 2022

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e0bba43
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/6319f1f39586df0008b057e8
😎 Deploy Preview https://deploy-preview-1393--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tmcw tmcw mentioned this pull request Sep 8, 2022
extraKeys.push(key);

if (
!(
Copy link
Contributor

@FlorianWendelborn FlorianWendelborn Sep 8, 2022

Choose a reason for hiding this comment

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

Couldn't this !(A && B) be simplified to !B || !A?

I'd also guess that putting B first is faster as it's a simple comparison, but not sure on that

@colinhacks colinhacks merged commit 033088d into colinhacks:master Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants