Skip to content

lib: recycle queues - #61461

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
ronag:fixed-queue-pool
Jan 30, 2026
Merged

lib: recycle queues#61461
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
ronag:fixed-queue-pool

Conversation

@ronag

Copy link
Copy Markdown
Member

Avoid creating unnecessary garbage in the old space.

@ronag
ronag requested a review from mcollinaJanuary 21, 2026 13:12
@ronagronag changed the title internal: recycle queueslib: recycle queuesJan 21, 2026
@nodejs-github-botnodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 21, 2026
Avoid creating unnecessary garbage in the old space.
@codecov

codecovBot commented Jan 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (bcdf2e0) to head (2e5412f).
⚠️ Report is 184 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #61461 +/- ##
==========================================
- Coverage 88.53% 88.52% -0.01% 
==========================================
Files 704 704 Lines 208759 208984 +225 Branches 40281 40348 +67 ==========================================
+ Hits 184816 185006 +190 - Misses 15947 15962 +15 - Partials 7996 8016 +20 
Files with missing linesCoverage Δ
lib/internal/fixed_queue.js100.00% <100.00%> (ø)

... and 83 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ronag
ronag requested a review from anonrigJanuary 21, 2026 14:48
@ronag
ronag requested a review from RafaelGSSJanuary 21, 2026 16:35

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollinamcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 21, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 21, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@ronagronag added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 24, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@gurgundaygurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we use primordials in new code?

To not have Primordials I made the same PR but with just one spare in #60031 a few months ago, but this is better if methods are fine

constructor() {
this.head = this.tail = new FixedCircularBuffer();
this.head = this.tail = FixedQueue.#pool.pop() ?? new FixedCircularBuffer();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No primordial?

@gurgundaygurgunday left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@RafaelGSSRafaelGSS added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 30, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 30, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 7407164 into nodejs:mainJan 30, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 7407164

aduh95 pushed a commit that referenced this pull request Feb 2, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request Feb 2, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request Feb 10, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request Feb 14, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
aduh95 pushed a commit that referenced this pull request Feb 22, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 16, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: nodejs#61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
juanarbol pushed a commit that referenced this pull request Jul 17, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
juanarbol pushed a commit that referenced this pull request Jul 19, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
marco-ippolito pushed a commit that referenced this pull request Jul 29, 2026
Avoid creating unnecessary garbage in the old space.
PR-URL: #61461
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ronag@nodejs-github-bot@mcollina@anonrig@RafaelGSS@gurgunday