Skip to content

fix(cli): compress the embedded web UI at brotli's best quality - #53644

Merged
Hona merged 1 commit into
cli-raw-assetsfrom
brotli-max-quality
Oct 7, 2026
Merged

Hona merged 1 commit into
cli-raw-assetsfrom
brotli-max-quality

Conversation

@Hona

@Hona Hona commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

The embedded web UI compresses once per release, so it now uses brotli's best quality, 11, instead of 6. Each asset compresses on the thread pool, in parallel.

Windows x64, OPENCODE_CHANNEL=prod Before (#53643) This PR Change
CLI (opencode.exe) 206.8 MB 203.8 MB −3.0 MB
Desktop installer (NSIS) 244.3 MB 241.4 MB −2.9 MB
Node CLI (opencode2-node.exe) 177.7 MB 174.7 MB −3.0 MB
Embedded web UI 27.0 MB 24.0 MB −11%
Web UI by type Quality 6 Quality 11
JS, CSS, HTML 7.1 MB 6.5 MB
Fonts 9.0 MB 8.3 MB
WASM 10.4 MB 8.7 MB
  • Cost: about 30 to 60 seconds more per release build. The archive builds once per build, not once per target.
  • A larger window (lgwin 24) saved only another 0.1 MB, so this keeps the default.
function compress(body: Buffer) {
  return promisify(brotliCompress)(body, {
    params: { [constants.BROTLI_PARAM_QUALITY]: 11, [constants.BROTLI_PARAM_SIZE_HINT]: body.length },
  })
}

Copilot AI balanced review requested due to automatic review settings October 7, 2026 01:13

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.

@Hona
Hona added this pull request to stack #53646 October 7, 2026 01:13
@Hona
Hona force-pushed the brotli-max-quality branch from 9ac60a9 to e120cde Compare October 7, 2026 01:23
The web UI compresses once per release, so it takes quality 11 instead of 6, in parallel on the thread pool.
@Hona
Hona force-pushed the brotli-max-quality branch from e120cde to 8c362ec Compare October 7, 2026 01:24
@Hona
Hona merged commit a7f3d57 into v2 Oct 7, 2026
11 of 13 checks passed
@Hona
Hona deleted the brotli-max-quality branch October 7, 2026 01:35
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