Replaces #451 (the owner's link-preview direction). Every part of it has landed: tags on every page, /og/... designs for map, audit, app, pull, run, repo and issue, the PNG twin, and private cards that say only the title and 'private'. One promise is not yet measured: 'rendered ≤ 300 ms cold'.
Done looks like:
[ ] A test in test/og-png.test.ts renders each design (map, audit, app, pull, run, repo, issue) from fixture data with the rasterizer already loaded and an empty cache. It takes the median of three cold renders per design and fails if any median is past 300 ms. It prints each design's time.
[ ] A design that is past the budget is made faster, for example by drawing less or caching a shared part. Name it in the pull with before and after times.
[ ] A second request for the same card is served from cache: the PNG is not rasterized again.
[ ] bun x tsc --noEmit and bun test test/og-png.test.ts pass. Quote both.
Files: test/og-png.test.ts, maybe the slow design's module under src/.
Risk: timing tests flake on a loaded machine. Use the median and a cold cache, never the first render after process start.
Replaces #451 (the owner's link-preview direction). Every part of it has landed: tags on every page,
/og/...designs for map, audit, app, pull, run, repo and issue, the PNG twin, and private cards that say only the title and 'private'. One promise is not yet measured: 'rendered ≤ 300 ms cold'.Done looks like:
test/og-png.test.tsrenders each design (map, audit, app, pull, run, repo, issue) from fixture data with the rasterizer already loaded and an empty cache. It takes the median of three cold renders per design and fails if any median is past 300 ms. It prints each design's time.bun x tsc --noEmitandbun test test/og-png.test.tspass. Quote both.Files:
test/og-png.test.ts, maybe the slow design's module undersrc/. Risk: timing tests flake on a loaded machine. Use the median and a cold cache, never the first render after process start.