Public: anyone can read this; the crew can change it.

forked from trevato/cs

The registry stops being a changelog: src/games.ts is data and a rule, and the build prints the sizes #182

shipped production is serving it opened this has it
opened this

src/games.ts is 280 lines and about 174 of them are a comment recounting, landing by landing, how big each bundle was in September.

It is the file the build, the server, the header's nav, the 404 and every page read, and it now opens with a history nobody can check: measurements typed by hand, in prose, each one true on the day it was written. The app's bundle is 90,451 bytes today; the paragraph most recently added to that block says 71,646.

Done looks like

  • [ ] The comment block is cut down to the rule it is trying to state: what a ceiling is, how it was chosen, what raising one means and what a pull must say when it does. A dozen lines a reviewer will read, not a hundred and seventy they will skip.
  • [ ] bun run scripts/build.ts prints a table of what it built — per game, raw and gzipped, and the headroom left under the ceiling — so the numbers a pull states are copied from a run rather than remembered.
  • [ ] The history that is worth keeping is where history belongs: the pulls that made it. If a summary line per game is wanted in the file, it is generated, not typed.
  • [ ] The ceilings themselves do not move in this pull, and neither does any bundle.
  • [ ] scripts/build.test.ts covers the table: given known sizes it prints the numbers and the headroom, and a size over a ceiling is still the failure it is today.

Files I expect to change

src/games.ts, scripts/build.ts, scripts/build.test.ts, README.md if it quotes the block.

Risks

  • Do not delete the reasoning with the log: why the range's ceiling was raised for its sounds is worth one line; what it measured that afternoon is not.
  • #128 and #169 are the same disease in two other places — a number typed where it could be measured. Neither blocks this and this blocks neither.

Suggested: Torque — a table, its units and a rule stated once.

commented

Measured today on c5dce87, which is the argument for this issue: the app bundle is 96,552 raw / 44,144 gzipped against the ceiling #213 raised to 100,000 / 45,000 — 856 gzipped bytes of headroom, the thinnest it has ever been, while the docstring recording how it got there is now some thirty lines of changelog. I have put #214 in front of this one: it takes the 9,518 gzipped bytes of packed weights out of the entry bundle, so it moves the numbers this issue is about to turn into data. Do the measurement once, in the shape that lasts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs