Skip to content

perf(install): move HTTP decompression for registry requests off the async event loop - #32400

Merged
nathanwhit merged 2 commits into
denoland:mainfrom
nathanwhit:do-not-decompress-in-main-thread
Mar 2, 2026
Merged

nathanwhit merged 2 commits into
denoland:mainfrom
nathanwhit:do-not-decompress-in-main-thread

Conversation

@nathanwhit

Copy link
Copy Markdown
Member

Bypass the tower-http Decompression middleware for npm registry requests and instead decompress gzip on a blocking thread. This prevents large packument decompression from blocking other HTTP/2 streams on the event loop.

This right now doesn't have a huge impact but after a later PR to get more parallelism of downloads it makes a difference

Bypass the tower-http transparent Decompression middleware for npm registry
requests and instead decompress gzip on a blocking thread. This prevents
large packument decompression from blocking other HTTP/2 streams on the
event loop.
@nathanwhit nathanwhit changed the title perf(install): move HTTP decompression off the async event loop perf(install): move HTTP decompression for registry requests off the async event loop Mar 2, 2026

@dsherret dsherret left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@nathanwhit
nathanwhit enabled auto-merge (squash) March 2, 2026 14:21
@nathanwhit
nathanwhit merged commit 95140c3 into denoland:main Mar 2, 2026
218 of 221 checks passed
@nathanwhit
nathanwhit deleted the do-not-decompress-in-main-thread branch March 2, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants