Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
feat(scope-manager): only call Object.entries once for each lib#10647
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
feat(scope-manager): only call Object.entries once for each lib#10647
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Thanks for the PR,@dmichon-msft! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. |
netlifybot commentedJan 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview fortypescript-eslint ready!
To edit notification comments on pull requests, go to yourNetlify site configuration. |
nx-cloudbot commentedJan 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
View yourCI Pipeline Execution ↗ for commit1210cad.
☁️Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for doing this!
Let's just go one step further here and remove the need for any runtime calls toObject.entries
.
We can just generate all of the lib files as an array of arrays so that there's no calls at all!
Same with the barrel file -- we can generate the map contents as an array of arrays.
Since you gave me license to restructure the objects from the individual |
I'm happy to go with a bigger refactor of how all of this works. Just need to get the tests passing and we can move forward with this! |
I can rebase/merge this to reconcile the changes to exports that happened a bit back, I just hadn't since the guidance was to leave that to maintainers. |
f7ee0a6
to3cda068
Comparecodecovbot commentedFeb 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@## main #10647 +/- ##======================================= Coverage 87.44% 87.44% ======================================= Files 469 469 Lines 16047 16053 +6 Branches 4649 4650 +1 =======================================+ Hits 14032 14038 +6 Misses 1658 1658 Partials 357 357
Flags with carried forward coverage won't be shown.Click here to find out more.
|
thanks heaps for this! |
355e892
intotypescript-eslint:mainUh oh!
There was an error while loading.Please reload this page.
Before this change, runninghttps://github.com/typescript-eslint/performance:
After:
Nice 🔥 |
PR Checklist
Overview
Improves performance of
populateGlobalsFromLib
by ensuring that the referenced lib objects have theirObject.entries
arrays precomputed. Also saves on garbage collection since each object only ever has a single array of variable specifications.