Skip to content

perf(package): ship only docs/examples and gzip the popular-name lists - #65

Merged
danoszz merged 1 commit into
mainfrom
perf/gzip-popular-lists
Oct 20, 2026
Merged

danoszz merged 1 commit into
mainfrom
perf/gzip-popular-lists

Conversation

@danoszz

@danoszz danoszz commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Why: main packed at 795 kB against the internal audit's 800,000-byte budget, so the redesign (#63, about +32 kB) would fail the release gate.

What:

  • package.json files ships docs/examples instead of all of docs/. The setup wizard reads docs/examples/pr-dependency-review.yml at run time; nothing else in docs/ is read. The README's relative links resolve to GitHub on npmjs.com.
  • lib/deps/popular-packages.json and popular-pypi.json are stored gzipped and loaded with gunzipSync. The refresh scripts, docs-numbers and incident-radar read and write the .gz files. The same 7,765 npm and 8,000 PyPI names load.

Result: 797 kB → 657 kB packed, 2.3 MB → 1.7 MB unpacked. Gzipping alone barely changed the packed size, because npm already gzips the tarball; the docs trim did that.

Checks: 902 tests pass; audit:internal passes every gate.

🤖 Generated with Claude Code

The packed tarball was at 795 kB of the audit's 800,000-byte budget, so the
dashboard redesign (#63, +32 kB) would fail the release gate. The docs live
on GitHub; only docs/examples is read at run time (by the setup wizard).
Gzipping the typosquat lists does little for the packed size (npm gzips the
tarball) but cuts the unpacked install. 797 kB -> 657 kB packed,
2.3 MB -> 1.7 MB unpacked.

AI-Assisted: Claude Code with Claude Opus 5.5; measured the package, found
  that gzip alone did not help the packed size, and narrowed the files list
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@danoszz
danoszz merged commit ed6b7d9 into main Oct 20, 2026
5 checks passed
@danoszz
danoszz deleted the perf/gzip-popular-lists branch October 20, 2026 10:44
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