-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
path: fix POSIX path.resolve() perf regression #38064
Closed
Closed
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
mscdex
added
path
Issues and PRs related to the path subsystem.
performance
Issues and PRs related to the performance of Node.js.
labels
Apr 3, 2021
This comment has been minimized.
This comment has been minimized.
mscdex
force-pushed
the
path-resolve-fix-perf-regression
branch
from
April 4, 2021 03:30
ed62b39
to
7b1cc3d
Compare
This comment has been minimized.
This comment has been minimized.
mcollina
approved these changes
Apr 4, 2021
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
mscdex
force-pushed
the
path-resolve-fix-perf-regression
branch
from
April 4, 2021 16:24
7b1cc3d
to
02deafb
Compare
Trott
approved these changes
Apr 5, 2021
Fast-track to get this into the 15.14.0 release that's happening in another day-and-a-half or so? |
Merged
targos
approved these changes
Apr 5, 2021
evanlucas
approved these changes
Apr 5, 2021
lpinca
approved these changes
Apr 5, 2021
BridgeAR
approved these changes
Apr 5, 2021
Landed in e38d62a. |
Trott
pushed a commit
that referenced
this pull request
Apr 6, 2021
PR-URL: #38064 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
fast-track
PRs that do not need to wait for 48 hours to land.
needs-ci
PRs that need a full CI run.
path
Issues and PRs related to the path subsystem.
performance
Issues and PRs related to the performance of Node.js.
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.
b0d5e03 introduced an unnecessary performance regression when using
path.resolve()
on POSIX systems. This commit both removes that regression in that situation and reduces the performance hit whenpath.posix.resolve()
is used directly/indirectly on Windows systems.The following benchmark results come from a Linux system:
After b0d5e03:
After the new implementation (basically caching the regexp):
After avoiding the transformations from b0d5e03 for POSIX systems (I'm not sure why there is a performance increase in this case, as I would have expected zero or close to zero change, but that's V8 for you):
/cc @Trott @mcollina