GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v6.x] perf(h1): drop idle-socket timer floor with a ref'd setImmediate (#5707) by mcollina · Pull Request #5770 · nodejs/undici

Conversation

@mcollina

@mcollina mcollina commented Sep 4, 2026

Copy link
Copy Markdown
Member

Backport of #5707 to v6.x. Refs #5731.

Sequential keep-alive reuse on HTTP/1.1 pays Node's ~1ms setTimeout(0) floor on every request since the idle-socket validation introduced for GHSA-35p6-xmwp-9g52, which turns a loopback fetch() loop from ~5000 rps into ~650 rps. This switches the deferral to a ref'd setImmediate, exactly as on main: the validation still runs after the poll phase so pending bytes, FIN or RST on the idle socket are observed before the next request is written, without the timer floor and without the unref'd-Immediate stall from #5600.

Measured on this branch with the issue's repro (Node 24.18, loopback, arrayBuffer() consumed per request): ~650 rps before, ~5200 rps after.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N2SCPUfzVYWJTvtVwZ3AYV

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anonrig @mcollina
perf(h1): drop idle-socket timer floor with a ref'd setImmediate (#5707)
c9949fd
(cherry picked from commit 8c9182e)
Signed-off-by: Matteo Collina <[email protected]>

# Conflicts:
#	test/node-test/keep-alive-reuse.js
@mcollina mcollina mentioned this pull request Sep 4, 2026
fetch(): sequential keep-alive loopback requests ~45x slower than npm undici 7.16 on the SAME runtime (regression window 7.17-7.29) #5731
Closed
@mcollina
mcollina requested a review from metcoder95 September 4, 2026 08:57
metcoder95
metcoder95 approved these changes Sep 4, 2026
View reviewed changes
ronag
ronag approved these changes Sep 4, 2026
View reviewed changes
@mcollina
mcollina merged commit 3866a3b into v6.x Sep 4, 2026
44 of 53 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mcollina
mcollina deleted the backport-5707-to-v6.x branch September 4, 2026 09:35
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
[Release] v6.28.1 #5773
Merged
This was referenced Sep 23, 2026
refactor: Bump undici from 6.27.0 to 6.28.1 parse-community/Parse-SDK-JS#3105
Merged
refactor: Bump undici from 6.27.0 to 6.28.1 parse-community/parse-dashboard#3460
Merged
This was referenced Oct 24, 2026
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/node-apn#226
Merged
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/Parse-SDK-dotNET#436
Merged
refactor: Bump undici from 6.27.0 to 6.29.1 and 7.28.0 to 7.30.1 parse-community/parse-server-example#947
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ronag ronag ronag approved these changes
@metcoder95 metcoder95 metcoder95 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mcollina @ronag @metcoder95 @anonrig
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.