tracker
All repositories: gitoria
4.7 KB
# Mission 046 report — person page speed (tracker#46)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.## Cause`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).## Fixlib/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).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.## Same outputFix 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.## Gates (new final = efe1b48+, ports 8742–8748; old = T12's run on 9b3828a)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.## Numbers (ms; person: cold = first request after boot jobs settled, warm = 20 following; settled = no GC for 150 s)Table in atlas-evidence/T14/table.txt (old2 = 9b3828a, new2 = fix on old runtime, new3 = final).| person (credits) | old cold | old warm p95 / max | new cold | new warm p95 / max ||---|---|---|---|---|| Tom-Hanks (311) | 1295 | 1294 / 10749 | 91 | 62 / 606 || Martin-Scorsese (464) | 246 | 933 / 5119 | 109 | 162 / 4612 || Whoopi-Goldberg (423) | 348 | 5737 / 9352 | 104 | 68 / 688 || William-Shatner (405) | 623 | 1286 / 6891 | 120 | 76 / 4247 || James-Deen (1711, 41 KB page) | 107 | 83 / 86 | 44 | 19 / 34 || Zoreen-Ismail (3, control) | 62 | 47 / 55 | 10 | 15 / 30 |(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).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.## Open- 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.- 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.- Cold first visit of a person still decodes its titles once (≤ 0.7 s).- 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
- c41587d2Merge branch 'bs2' into mainTracker
- 0dd538a6|||PR BS2: finish the boot index in slices so a booting instance keeps answeringTracker
- 019d5cedMerge branch 'records-1110' into mainTracker
- f88ae8b9|||PR records: day56 toggle live, reviewTracker
- b6b3bb4dMerge branch 'ap56e' into mainTracker
- 29a26da9|||PR AP56e: guard hidden show helpers during session syncTracker
- 7c9ec236|||PR AP56e: re-vendor Hybriel set day56 (source 36ae83a8, bin c1f595a2)Tracker
- 4b54f6f9Merge branch 'records-audit' into mainTracker
- cab4a3bc|||PR records: branch audit, PR-onlyTracker
- 641e1c4cMerge branch 'records-dp71' into mainTracker
- 85a6e9f5|||PR records: DP71 checked in ChromeTracker
- f5be5f18records: gitoria PR-only planTracker
- 46a37036records: DP71 liveTracker
- 3bcb7039Status/log: DP71 in progressTracker
- 5b3a5693Log: SR1b merged via PR 2, DP71 startedTracker
- 783957c2Merge branch 'sr1-search' into mainTracker
- 792b9652README: search results come from the routeTracker
- fd8570b1|||PR search: one server exchange per keystrokeTracker
- e8f5cbcaLog: SR1 result, SR1bTracker
- 8ad275a4Log/status: tracker 68, SR1Tracker