Add brotli compressed files to console bundle
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust, typescript
- 領域
- api, build-system
調査の方向性
nexus/src/external_api/console_api.rs の 366-383 行目から始め、既存の .js ファイルと .js.gz ファイルがどのように選択され、配信されるかを追跡します。次に、gzip ファイルを生成するコンソールのビルドステップを見つけます。Brotli ファイルが gzip ファイルと並んで生成され、Nexus が既存のフォールバックを維持しながら content negotiation を通じてそれらを配信すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
We currently have .js and .js.gz — Brotli will be even smaller and the extra CPU cost doesn't matter because we're doing it at build time. We would need to add support for brotli files to Nexus here.
I had Claude compare different compression algos:
What do we get for it?
Measured on a fresh production build (.js + .css only — the actual first-load payload; sourcemaps excluded since they're only fetched when devtools open). Raw total: 2.62 MB.
| Encoding | Size | % of raw | vs gzip-9 |
|---|---|---|---|
| gzip -6 (current) | 823 KB | 31.4% | baseline |
| gzip -9 | 822 KB | 31.4% | −0.2% |
| deflate (zlib -9) | 821 KB | 31.3% | −0.1% |
| zstd -19 | 764 KB | 29.1% | −7.0% |
| zstd -22 | 764 KB | 29.1% | −7.0% |
| brotli q11 | 708 KB | 27.0% | −13.8% |
For the dominant first-load chunk index.js (622 KB raw): gzip 185 KB → zstd-19 164 KB → brotli 156 KB (−16% vs gzip).
On deflate (your question)
Skip it. "deflate" Content-Encoding is the same DEFLATE algorithm as gzip with a zlib wrapper instead of the gzip header — it came out 0.1% smaller than gzip-9 (just header-byte savings). No reason to add it.
Level sensitivity
- gzip: -6 vs -9 is a rounding error (~0.2%). The current
-6default is fine; no point bumping. - zstd: -3 is worse than gzip (855 KB); only high levels help, and -19 ≈ -22 here. Use -19 if used at all.
- brotli: q5→q9→q10→q11 = 773→760→720→708 KB. q11 is the clear pick. Build cost is trivial since it's once per deploy in CI — q11 over all files (incl. maps) took ~12s sequential; js+css alone is ~2s.
Browser support
- brotli (
br): universal in all modern browsers over HTTPS (the console is HTTPS). Safe, highest value. - zstd (
zstd): Chrome 123+ / Firefox 126+ (both 2024), not Safari. Fewer clients advertise it, so it'd be a fallback tier between brotli and gzip.
Recommendation
Add brotli q11 alongside gzip — ~14% smaller payloads (~113 KB off total, ~16% off the big chunk) at near-zero build/serving cost, with universal browser support. zstd-19 is a reasonable optional middle tier given the negotiation handles fallback, but it's a smaller, Safari-less win. Drop deflate.
- 主要言語
- TypeScript
- スター
- 228
- フォーク
- 22
- 平均マージ
- 19時間 42分
- マージ済み PR(30日)
- 32
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
oxidecomputer/console のほかの issue
-
Disks: Disable 'Size' field when selecting 'Make disk read-only' and 'Image'/'Snapshot' as a sourceオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oxidecomputer/console#3391 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Alerting > Receivers: Error message for subscriptions gets hidden by empty dropdown when zoomed outオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxidecomputer/console#3390 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 72/100
oxidecomputer/console#3375 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
oxidecomputer/console#3338 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oxidecomputer/console#3327 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
oxidecomputer/console の issue をすべて見る
似ている issue
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Fission-AI/OpenSpec#1986 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
nestjs/docs.nestjs.com#3554 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
publicodes/publicodes#868 ·
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
EclipseFdn/open-vsx.org#13488 ·
メンテナーはふだん 2 日以内に返信