Skip to content

perf(gzip): read compressed input in chunks - #150

Merged
paralin merged 1 commit into
masterfrom
perf/gzip-reader-buffer
Aug 5, 2026
Merged

perf(gzip): read compressed input in chunks#150
paralin merged 1 commit into
masterfrom
perf/gzip-reader-buffer

Conversation

@paralin

@paralin paralin commented Aug 5, 2026

Copy link
Copy Markdown
Member

The compress/gzip override currently collects Reader input through a one-byte buffer before passing the complete payload to the native gzip implementation. Generated readers therefore issue hundreds of thousands of calls for an ordinary block even though browser DecompressionStream performs the actual decompression.

Read input through a 32 KiB buffer instead. This preserves synchronous and asynchronous Reader behavior while removing per-byte generated call overhead.

Record the matching repository rule so future runtime overrides collect byte streams in bounded chunks and defend bulk paths with Reader-call regression coverage.

Copilot AI lite review requested due to automatic review settings August 5, 2026 07:54

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 5, 2026 07:58
@paralin
paralin force-pushed the perf/gzip-reader-buffer branch from efd9ddf to 9324a5e Compare August 5, 2026 07:58

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Read gzip sources with a 32 KiB buffer instead of issuing one reader call per byte. This removes generated call overhead before the native decompression stream receives the payload.

Signed-off-by: Christian Stewart <christian@aperture.us>
@paralin
paralin force-pushed the perf/gzip-reader-buffer branch from 9324a5e to dc07f8b Compare August 5, 2026 17:06
Copilot AI review requested due to automatic review settings August 5, 2026 17:06

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@paralin
paralin merged commit 661bb9d into master Aug 5, 2026
9 checks passed
@paralin
paralin deleted the perf/gzip-reader-buffer branch August 5, 2026 17:08
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.

2 participants