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

fix(performance): improve omit #461

Merged
merged 1 commit into from
Nov 27, 2023
Merged

fix(performance): improve omit #461

merged 1 commit into from
Nov 27, 2023

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Nov 27, 2023

This PR is improving the omit function performance by avoiding the array utility functions. It also initializes the object with proto: null to be more resilient to potential prototype pollutions. proto: null puts the object into dictionary mode which is slightly less performant. So probably the performance improvements of avoiding the array utility function is eaten by the dictionary mode. But I think the security aspect is more important.

Resolves #ISSUE_NUMBER


Before the change?

After the change?

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@gr2m gr2m changed the title chore: improve omit fix(performance): improve omit Nov 27, 2023
@gr2m gr2m merged commit d6089a4 into octokit:main Nov 27, 2023
7 of 8 checks passed
Copy link

🎉 This PR is included in version 9.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Apr 5, 2024

🎉 This PR is included in version 9.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants