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
Chore: cache results in runtime-info #12320
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eslint-deprecated
bot
added
the
triage
An ESLint team member will look at this issue soon
label
Sep 26, 2019
kaicataldo
force-pushed
the
runtime-info-cache-results
branch
from
September 26, 2019 19:26
12689e4
to
67e3db4
Compare
kaicataldo
changed the title
Chore: cache reuslts in runtime-info
Chore: cache results in runtime-info
Sep 26, 2019
kaicataldo
added
chore
This change is not user-facing
and removed
triage
An ESLint team member will look at this issue soon
labels
Sep 26, 2019
kaicataldo
force-pushed
the
runtime-info-cache-results
branch
from
September 26, 2019 19:34
67e3db4
to
c01e5a1
Compare
platinumazure
approved these changes
Sep 26, 2019
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.
LGTM, thanks!
mysticatea
approved these changes
Sep 27, 2019
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.
LGTM, thank you!
As a side note, we may be able to reduce |
This was referenced Oct 22, 2019
This was referenced Nov 9, 2019
This was referenced Mar 11, 2020
eslint-deprecated
bot
added
the
archived due to age
This issue has been archived; please open a new issue for any further discussion
label
Mar 27, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
chore
This change is not user-facing
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[x] Other, please explain:
What changes did you make? (Give an overview)
This change improves performance by caching the results of the shell commands the
RuntimeInfo
module executes. In practice, this only improves performance when ESLint is installed locally and globally (which we're actively discouraging these days), but it's something!In the code path described above, I'm seeing these results on my local machine (average over 5 runs with each branch):
master
: ~3.072sruntime-info-cache-results
: ~2.826sIs there anything you'd like reviewers to focus on?
Nothing in particular. This PR is a lot easier to review by hiding whitespace changes.