Slow pages: minified files' highlighting, and function history pages issue #249 closed: completed andymccall opened this · 4 comments
andymccall set labels performance ·
Function pages are not slow in themselves: one of tonight's slow URLs answers in 30-40 ms now (Earth, twice, two ranges). The slow ones came in bursts that all ended in the same second (04:38:05, 04:57:33): a crawler's many function pages waiting on andymccall/oxygen's write lock, held by its gc after the 04:34 restart (37 s; the gc rerun is fixed in faf9b557) and by a push. Reads waiting for a repository's writes is the real issue: a read could serve the last committed state while a gc or push runs. That is a larger change; noted here, not started.
File pages of docs/spec.md (4-11 s tonight) are not rendering cost either: rendering the 137 KB spec as Markdown takes 8 ms, highlighting it 0.9 ms. Like the function pages, they waited on cold state loads and the repository's write lock.
Deployed 31f82214 (05:52): the editor.js file page now answers in 0.05 s (was 7-12 s). Open for the reads-wait-for-writes stalls.
andymccall referenced by change 6aedcd6c0ad2 on main ·
Decided by Andy (2026-10-18): readers never wait.
- oxy-core: a handle reads the head once (a snapshot per request); a store reloads its pack list and retries once on a miss; gc retires old packs and loose objects instead of deleting them, and a later gc removes what was retired over an hour before (so a reader that listed them still finds them); the bucket listing cache is invalidated after a PUT/DELETE completes as well as before.
- Hub: writers (push, gc, edits, landings, Diffusion, Flow's blobs) queue only behind other writers; reads take no lock; deleting or transferring a repository still excludes everything.
- Races to cover with tests (from the survey): repack vs an open reader (deleted pack, deleted loose objects, idx gone at open, dict gone), a push that spills into a pack vs an open reader, one page reading two heads, the bucket listing re-cached stale.
- A core change: oxygen → oxygenflow → hub pins; runners rebuilt before any data relies on it.
closed by change 7c06f5b28ade ·
From the hub's slow-request log on Earth, 2026-10-17 (after the metalgear2 bucket fixes):