-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
url: improve resolveObject with ObjectAssign #54092
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
Review requested:
|
nodejs-github-bot
added
needs-ci
PRs that need a full CI run.
url
Issues and PRs related to the legacy built-in url module.
labels
Jul 29, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #54092 +/- ##
==========================================
- Coverage 87.07% 87.07% -0.01%
==========================================
Files 643 643
Lines 181583 181583
Branches 34886 34886
==========================================
- Hits 158114 158112 -2
Misses 16751 16751
- Partials 6718 6720 +2
|
jasnell
approved these changes
Jul 29, 2024
anonrig
approved these changes
Jul 29, 2024
Benchmark CI: https://ci.nodejs.org/job/benchmark-node-micro-benchmarks/1586/ Results
|
daeyeon
approved these changes
Jul 29, 2024
daeyeon
added
request-ci
Add this label to start a Jenkins CI on a PR.
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
commit-queue
Add this label to land a pull request using GitHub Actions.
labels
Jul 29, 2024
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Jul 29, 2024
EarlyRiser42
force-pushed
the
resolveObject
branch
from
July 30, 2024 05:34
03a8459
to
54bebc4
Compare
EarlyRiser42
force-pushed
the
resolveObject
branch
from
July 30, 2024 05:40
b4abb99
to
f411305
Compare
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Jul 30, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
added
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
and removed
commit-queue
Add this label to land a pull request using GitHub Actions.
labels
Jul 31, 2024
Commit Queue failed- Loading data for nodejs/node/pull/54092 ✔ Done loading data for nodejs/node/pull/54092 ----------------------------------- PR info ------------------------------------ Title url: improve resolveObject with ObjectAssign (#54092) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch EarlyRiser42:resolveObject -> nodejs:main Labels url, author ready, needs-ci Commits 1 - url: improve resolveObject with ObjectAssign Committers 1 - EarlyRiser42 <[email protected]> PR-URL: https://github.com/nodejs/node/pull/54092 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/54092 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]> -------------------------------------------------------------------------------- ⚠ Commits were pushed since the last approving review: ⚠ - url: improve resolveObject with ObjectAssign ℹ This PR was created on Mon, 29 Jul 2024 05:08:45 GMT ✔ Approvals: 3 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/54092#pullrequestreview-2205488049 ✔ - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/54092#pullrequestreview-2205511559 ✔ - Daeyeon Jeong (@daeyeon): https://github.com/nodejs/node/pull/54092#pullrequestreview-2206281172 ✔ Last GitHub CI successful ℹ Last Benchmark CI on 2024-07-29T23:18:05Z: https://ci.nodejs.org/job/benchmark-node-micro-benchmarks/1586/ ℹ Last Full PR CI on 2024-07-31T01:51:04Z: https://ci.nodejs.org/job/node-test-pull-request/60758/ - Querying data for job/node-test-pull-request/60758/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/10174423900 |
daeyeon
removed
the
commit-queue-failed
An error occurred while landing this pull request using GitHub Actions.
label
Jul 31, 2024
daeyeon
approved these changes
Jul 31, 2024
daeyeon
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Jul 31, 2024
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Jul 31, 2024
Landed in b4fd1fd |
targos
pushed a commit
that referenced
this pull request
Aug 14, 2024
PR-URL: #54092 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
needs-ci
PRs that need a full CI run.
url
Issues and PRs related to the legacy built-in url module.
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.
Summary
This PR enhances the performance of the resolveObject function by replacing the for loop used for copying properties with ObjectAssign.
Changes
Replaced the for loop in the resolveObject function with ObjectAssign and reduce to improve performance.
Based on local benchmark tests, the reduce method demonstrates a slight performance advantage over the for statement.
Benchmark Results
local benchmark shows performance improvements