gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/reports/046a-photoq.md

4.4 KB

  1. # Report 046-a — photoQueue in slices, the 22 s TTFB found and fixed, re-vendor 528bc89f — branch w46-photoq (NOT pushed, NOT deployed)
  2. Base w45-trkmem 31dcf2a. Commits: photoQueue slices · photoQueue guard · re-vendor 528bc89f (plugins mpackdb/time/web; bin/ copied from hybriel native/zig-out, git-ignored) · franchise-seed fix · report.
  3. ## 1. photoQueue
  4. people.hl: `photoQueueStart()` snapshots the people view's id list (already /people's order, in RAM), `photoQueueStep(c)` walks it from a cursor, fetches rows and keeps ids until sliceBudgetMs (15 ms, checked every 64 ids) is spent; jobs.hl photoTick calls it per 0.1 s tick, then proceeds as before. A non-row fetch result (damaged index, a Number) is skipped + counted (`scan.skipped`) — the old loop crashed on it (first real-data try: "reading 'tmdbId': the value is Number").
  5. Same output: tests/photoqueue.hl runs the old one-shot loop (inlined verbatim) and the sliced one in one process on the same store. Bulk fixture (231 persons; and with every 3rd/5th person marked so the predicate has both outcomes: 231 → 123 ids): SAME ORDER AND IDS both times, TRACKER_SLICE_MS=0. Mutation (drop id #100) → DIFFERENT, so the test can fail. REAL data (T6 tar copy, 599,901 persons): old 302,511 ids in ONE 50.8 s block; new 302,511 ids, **identical order**, 498 ticks, 18.5 s scanning in total, longest tick 462 ms (evidence photoqueue-real.txt). No deliberate order change.
  6. Not exercised in the run-B server: the photo job is the LAST start job (after the details repair of 9,415 titles); it had not started within 10 min.
  7. ## 2. The 22 s TTFB — reproduced (1st try) and fixed
  8. Run A (no token) on the final code: A1 reproduced it: `/` 21.06 s at 139 s after first 200, right after `merge done` (TTFB 0.37–0.45 s before and during merge prepare, so merge prepare itself is sliced fine). Server log: **`franchise seed: slow step, 22053 ms`**. Not a GC pause (max 4.5 s). The franchise seed's single build step → `supersedeCollections` asks `seededCoverOf(order)` for each of the 1,417 live timelines, and every ask re-read the whole timelines table (`find(null,null)`: 1,417 decodes) = 2 M decodes in one tick. Standalone probe on the real copy (tests/franchise-build-time.hl): supersedeCollections 10,393 ms (22 s inside the busy server).
  9. Fix (franchises.hl / franchiseseed.hl): `seededTimelines()` loaded once, `seededCoverIn(seeds, order)`; `seededCoverOf` is a thin wrapper (collections.hl unchanged). Same answer (first match in table order). Probe: 10,393 → 26 ms. Run A2 on the fix: no slow step, worst TTFB 4.67 s (a boot-scan GC at 24 s). franchiseseed gate 26/0.
  10. ## 3. Gates (ports 8700–8706, load 4–8), new = w46-photoq, old = main 6648ba4 (T9's old bin)
  11. browser 382/0 · kinds 32/0 · franchises 53/0 · pager 229/0 · franchiseseed 26/0 · check-theme 100 files 0 problems (old 91, 0) — all equal to old and to T11.
  12. ## 4. Real data, jobs ON, fake TMDB 404 (ports 8720/8721, HL_GC_STATS=1, TRACKER_SYNC=0, load 5), Hybriel 528bc89f
  13. | | first 200 | RSS boot / 60 s / 10 min | VmHWM | GC n, sum / max | TTFB all p95 / max |
  14. |---|---|---|---|---|---|
  15. | T11 B new | 149 s | 6.7 / 6.3 / 5.3 GB | 9.1 GB | 159, 132 s / 5.6 s | 151 ms / 5.7 s |
  16. | **T12 B (w46 + int 6)** | **120 s** | **6.7 / 6.4 / 6.4 GB** | **8.4 GB** | 149, 120 s / 5.5 s | **71 ms / 4.3 s** |
  17. Per page p95 / max: `/` 187 ms / 4.3 s (a boot GC @81 s); /movies 30 / 410 ms; /series/The-Simpsons 60 ms / 3.1 s; /search?q=love 403 ms / 3.0 s. 58 polls per page, all 200. (T11 B new: / 1002·396, Simpsons 5726·151.)
  18. Int 6 heal: log `persons.mpack: an index named a place that is no record; indexes rebuilt from the data file` (once); persons slices (tests/persons-skip-count.hl): 4096 slices, rows=599,901, **skipped=0** (T11: 553 non-rows); the merge persons fallback did not run (0 duplicate groups anyway; no "falling back" line). Pages 16/16 not re-compared this run. RSS at 10 min 6.4 GB vs 5.3.
  19. Boot scan 77 s (T11 ~88–95 s), merge prepare 109 s.
  20. ## Open
  21. - The photo job under a live token not measured in a server (starts after the repair); standalone queue build 18.5 s sliced, max tick 462 ms (probably the first tick / a GC).
  22. - timelineOfCollection (per collection of the seed file) still `find` per call: ~17 calls, ms — left.
  23. Evidence: /media/STORAGE/claude-scratch/atlas-evidence/T12/ (run-A1/A2/fnew.txt, ttfb-*.txt, server-*.log, gate logs, photoqueue-real.txt, franchise-build-time*.txt). Scripts: atlas/T12/{runA.sh,runB.sh,doA.sh,doB.sh,gates.sh,pq-real.sh}.

Branches

Latest commits

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker