gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit593a6350593a6350boot: resumable start-up scan, the server listens first (T17)mre593a6350/reports/046-person.md

4.7 KB

  1. # Mission 046 report — person page speed (tracker#46)
  2. Branch w47-person (from w46-photoq 9b3828a): fix 53099ff, re-vendor efe1b48 (Hybriel master 60b2817b), + this report. Real copy of tracker-live-storage-20261021-1452, jobs ON, fake TMDB, HL_GC_STATS=1, one server, port 8740, load 10–15.
  3. ## Cause
  4. `filmographyOf` (lib/people.hl) fetched every credit's WHOLE title record (`showById` + `liveShowOf` → `showsTable.fetch`: cast + crew up to 300 entries each, decoded fresh) on EVERY request just to read title/year/href/kind — 311 decoded records for Tom Hanks, ~400 for the others. No whole-table scan on the request path (528bc89f's find(null,null) warning never printed: slug map is built at boot). The allocation feeds the byte-triggered GC; on the real heap (1.5–1.8 GB live, 22–24 M objects) one full GC pauses 5–12 s, so the 3–22 s are GC pauses hit by person requests (old: base 150–250 ms for Tom-Hanks, 5–12 s whenever a request tripped a GC; GC totals old2: 151 collections, 234 s paused, max 10.5 s).
  5. ## Fix
  6. lib/shows.hl: `creditRowCache` / `creditRowOf` / `creditRowLive` — a slim per-title row { id, mergedInto, public, title, year, release, href, posterName, typeLabel, typeClass }, filled at first ask, rebuilt by `refreshTitleCaches` (every title writer already calls it via refreshCatalogShow, same contract as cardCache), merge chain followed like liveShowOf. lib/people.hl `filmographyOf` uses it (poster URL's exists() check kept live). Cold = first visit of a person still fetches its titles once (Tom-Hanks ~0.1–0.7 s).
  7. Gate tests/person-lookup.mjs: the person page's per-request code (filmographyOf, personInfoOf, personBySlug, components/person.hl) may not call showsTable.fetch/find/iterate, showById, liveShowOf; fails on 9b3828a (`liveShowOf(`), passes on new.
  8. ## Same output
  9. Fix alone (new2, old vendored runtime) vs 9b3828a (old2): 6/6 person pages byte-identical after normalising the build hash (v=…): Tom-Hanks 260882 B, James-Deen 41481, Martin-Scorsese 379326, Whoopi-Goldberg 341246, William-Shatner 329336, Zoreen-Ismail 39742. Final (new3 = fix + Hybriel 60b2817b): the rendered markup is identical (6/6, all <script> stripped), the embedded state JSON differs because the new web plugin writes repeated lists as `{"$hlv":"vN"}` back-references (pages ~1 KB smaller: 259798 etc.) — runtime, not the fix.
  10. ## Gates (new final = efe1b48+, ports 8742–8748; old = T12's run on 9b3828a)
  11. browser 382/0, kinds 32/0, franchises 53/0, pager 229/0, franchiseseed 26/0, check-theme 100 files 0 problems, person-lookup passed. Old: 382/32/53/229/26, theme 0. Logs atlas-evidence/T14/gates-new.log.
  12. ## Numbers (ms; person: cold = first request after boot jobs settled, warm = 20 following; settled = no GC for 150 s)
  13. Table in atlas-evidence/T14/table.txt (old2 = 9b3828a, new2 = fix on old runtime, new3 = final).
  14. | person (credits) | old cold | old warm p95 / max | new cold | new warm p95 / max |
  15. |---|---|---|---|---|
  16. | Tom-Hanks (311) | 1295 | 1294 / 10749 | 91 | 62 / 606 |
  17. | Martin-Scorsese (464) | 246 | 933 / 5119 | 109 | 162 / 4612 |
  18. | Whoopi-Goldberg (423) | 348 | 5737 / 9352 | 104 | 68 / 688 |
  19. | William-Shatner (405) | 623 | 1286 / 6891 | 120 | 76 / 4247 |
  20. | James-Deen (1711, 41 KB page) | 107 | 83 / 86 | 44 | 19 / 34 |
  21. | Zoreen-Ismail (3, control) | 62 | 47 / 55 | 10 | 15 / 30 |
  22. (p95 of 20 = 19th value. new2 = fix on the old runtime: Tom-Hanks 74/75, Scorsese 88/5535, Whoopi 80/736, Shatner 72/4495, Deen 43/724, control 18/35.) Warm typical now 60–110 ms (pageOf 20–30 ms of it; the rest is SSR of a 260–380 KB page, unchanged).
  23. Boot memory (VmHWM, kB): old 7818896 (earlier run 6124748), fix on old runtime 6749440, final 7720400 (earlier new 7138836) — run-to-run noise ±1 GB on both sides, no growth from the fix (a cache of ~100 B per credited title). GC: old 151 collections / 234 s paused / max 10.5 s; final 149 / 156 s / max 6.6 s.
  24. ## Open
  25. - The p95 < 500 ms target is met for all; **max < 1.5 s is NOT met in every run**: with a 1.5–1.8 GB / 24 M-object heap a full GC pauses 4–6 s, and two byte-triggered GCs still land inside the 126 requests (Scorsese 4.6 s, Shatner 4.2 s in the final run; the old code hit one every few requests). That is the heap's GC cost (any request can trip it), not the person path any more; fewer/shorter GCs need runtime work (GC pacing/threshold, fewer live objects) — HL_GC_THRESHOLD / HL_GC_PACING exist in hlrt, not tried.
  26. - After boot, background jobs keep GC running every 10–90 s for ~5 more minutes (settle wait 280–320 s after first 200); person measurements wait until 150 s without GC.
  27. - Cold first visit of a person still decodes its titles once (≤ 0.7 s).
  28. - Re-vendor to 60b2817b broke nothing in the gates (382/32/53/229/26, theme 0); only visible change: page state JSON uses `$hlv` back-references.

Branches

Latest commits

  • 593a6350boot: resumable start-up scan, the server listens first (T17)mre
  • be4890a0reports: H2 hydration audit (no test change needed)mre
  • 1f9c8bf4re-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
  • c1df88eddocker-compose: HL_GC_TABLE_LOAD=62 (tracker mission 048, T16 real-data numbers)mre
  • d0a82867mission 048: report, LOG (HL_GC_TABLE_LOAD=62 measured)mre
  • 2d4be66fre-vendor Hybriel 5df4eb7e (GC: HL_GC_TABLE_LOAD knob, mission 406)mre
  • 99e7c8b9tests: realdata-m035-radii, repro-t38, realdata-060-backfill ports from env (REAL_PORT, REAL_CHROME, REPRO_CHROME), defaults unchangedmre
  • 4625aa22re-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
  • a6dfd6ecdeploy: person-lookup gate (tracker#46)mre
  • 33ad4bd5Merge commit 'f57f64f'mre
  • 7d38cec4docker-compose: nofile 65536 (default soft 1024 refused boot: errno 24 in fs.listDir, Hybriel 528bc89f)mre
  • f57f64f0mission 046: report, LOGmre
  • 5965963adeploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
  • efe1b485mission 046: re-vendor Hybriel master 60b2817b (integration 8, #203): plugins mpackdb + web (bin/ git-ignored: hybriel, libhlrt.a, hlc.o, hlrt/ from native/zig-out)mre
  • 53099ffbmission 046: person page reads a slim per-title credit row cache (no whole-record fetch per credit); gate tests/person-lookup.mjsmre
  • 9b3828aemission 046a: report, LOGmre
  • 4b37356emission 046: franchise seed supersedeCollections reads the curated timelines once (10 s one-tick block at the end of boot)mre
  • ac6268e3mission 046a: re-vendor Hybriel 528bc89f (integration 6): plugins mpackdb/time/web (bin/ git-ignored)mre
  • 322b3293mission 046: photoQueue guard for non-row fetch results (damaged persons index)mre
  • e5b99aecmission 046: photoQueue in slices (people.hl photoQueueStart/Step, jobs.hl photoTick), tests/photoqueue.hlmre