-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
http: be more generational GC friendly #56767
Conversation
Avoid any potential ref to Buffer in new generation from old generation
Review requested:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #56767 +/- ##
==========================================
- Coverage 89.22% 89.21% -0.01%
==========================================
Files 662 663 +1
Lines 192125 191976 -149
Branches 36972 36924 -48
==========================================
- Hits 171421 171273 -148
- Misses 13543 13566 +23
+ Partials 7161 7137 -24
|
tests are failing |
Failed tests should be fixed by #56768. But the linter complaints shall be addressed. |
Fix lint
@legendecas CI is green, please take a look |
@mcollina @legendecas PTAL |
This comment was marked as outdated.
This comment was marked as outdated.
Commit Queue failed- Loading data for nodejs/node/pull/56767 ✔ Done loading data for nodejs/node/pull/56767 ----------------------------------- PR info ------------------------------------ Title http: be more generational GC friendly (#56767) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch ywave620:gc -> nodejs:main Labels http, needs-ci Commits 2 - http: be more generational GC friendly - http: be more generational GC friendly Committers 1 - rogertyang <rogertyang@tencent.com> PR-URL: https://github.com/nodejs/node/pull/56767 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/56767 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Sun, 26 Jan 2025 03:45:19 GMT ✔ Approvals: 3 ✔ - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/56767#pullrequestreview-2585713986 ✔ - Gerhard Stöbich (@Flarna): https://github.com/nodejs/node/pull/56767#pullrequestreview-2585725660 ✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/56767#pullrequestreview-2586744900 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-01-31T11:59:13Z: https://ci.nodejs.org/job/node-test-pull-request/64870/ - Querying data for job/node-test-pull-request/64870/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 56767 From https://github.com/nodejs/node * branch refs/pull/56767/merge -> FETCH_HEAD ✔ Fetched commits as 261624bb06f4..e90637178b8c -------------------------------------------------------------------------------- [main 26d1d639c6] http: be more generational GC friendly Author: rogertyang <rogertyang@tencent.com> Date: Sun Jan 26 11:40:16 2025 +0800 1 file changed, 2 insertions(+) [main d766009343] http: be more generational GC friendly Author: rogertyang <rogertyang@tencent.com> Date: Mon Jan 27 11:10:10 2025 +0800 1 file changed, 2 insertions(+), 2 deletions(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- http: be more generational GC friendlyhttps://github.com/nodejs/node/actions/runs/13075397913 |
Landed in ba4587c |
Avoid any potential ref to Buffer in new generation from old generation PR-URL: #56767 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Avoid any potential ref to Buffer in new generation from old generation. Otherwise, the lightweight Minor GC could not collect Buffer, as a result, the heavy Major GC may be invoked more frequently
Similar tricks are used in Writable and Readable
node/lib/internal/streams/writable.js
Line 779 in ce6a628
node/lib/internal/streams/readable.js
Line 1598 in ce6a628