Skip to content

fix: keep memory flat when precompressing many files - #16993

Open
Nic-Polumeyv wants to merge 2 commits into
manifest-static-assetsfrom
compress-once
Open

fix: keep memory flat when precompressing many files#16993
Nic-Polumeyv wants to merge 2 commits into
manifest-static-assetsfrom
compress-once

Conversation

@Nic-Polumeyv

@Nic-Polumeyv Nic-Polumeyv commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

builder.compress starts gzip and brotli streams for every file at once. Node runs zlib work on its threadpool (https://nodejs.org/api/zlib.html#threadpool-usage-and-performance-considerations), so the fan-out only costs memory: about 800 MB peak on 2000 files.

2000 files x 20 KB:

time peak memory
before 2.5 s +800 MB
after 1.8 s +14 MB

@pkg-svelte-dev

pkg-svelte-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 996da7e:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/996da7e3e03d3d3b7ec06bf3be90539864ebba13

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16993

@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 996da7e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: fa2a6edc-521a-4baf-91bd-74dd1c9da456

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@svelte-docs-bot

Copy link
Copy Markdown

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.

1 participant