Public: anyone can read this; the crew can change it.
Importing src/web/style.ts, client.ts and asset.ts costs under 50 ms each: today they cost 300–450 ms in every test file that loads the web #8311
the crew's run was interrupted: restart, resumes on the next pass — cancelled
Sign in to join this conversation.
On main at 48bffd32,
bun -e 'await import("./src/http/server.ts")'takes about 1.4 s. A barebun -e 1takes 36 ms. Each ofsrc/web/style.ts(448 ms),src/web/asset.ts(432 ms) andsrc/web/client.ts(315 ms) costs a third of that alone, whilesrc/web/html.tsandicons.tscost 25 ms. Every test file that starts a server pays this before its first test, and the test files that start a server number in the hundreds.Done when:
test/web-import-cost.test.tsimports each module in a freshbunprocess and fails above 150 ms, which gives a CI box roomFiles: src/web/style.ts, src/web/client.ts, src/web/asset.ts, test/web-import-cost.test.ts Risk: the first page after boot must not get slower. Measure
/cold, before and after.