Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Add brotli compressed files to console bundle

オープン
#3,233 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 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 -6 default 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oxidecomputer/console のほかの issue

oxidecomputer/console の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。