gitoria
All repositories: gitoria
4.1 KB
# G3 — README page server time (gitoria, branch g3-ttfb from main 570138c)Change: `lib/markdown.hl` only. `markdownBlocks(text)` is now a cache in front of the old scanner (renamed `parseBlocks`, body unchanged).* Key = `sha256(text)` (hl:crypto). A push changes the README text, so the key changes: nothing to invalidate, a stale entry is only never asked for again (tested: pushed a README change to a repo of the data copy, next request showed it).* Bounded: LRU, at most 32 texts and 4 000 000 characters of source in total; a text over 1 000 000 characters is parsed but not kept. Flat statics written key by key (as tracker's maps), `delete` on eviction.* hl:web `runSteps` per-row copies (`rows[s.row] = entry`, `v.rowCtx`): that is **hl:web code (plugins/web/compile.hl, view.hl), not gitoria** — NOT touched; Arachne's W116.* Layout/CSS files untouched (MG). No JS.## Measurements (loreana at load 35–68, backup 20261023-0236 copied to scratch, public README page `/` of `<repo>.localhost`, old = main, new = g3-ttfb, requests interleaved old/new, 5 warm-ups then 40 each)In-process (hl:time monotonic, temporary instrumentation, removed): tracker README parse **330–475 ms per request** (old, once per request) → cache hit **11–15 ms**.TTFB, curl time_starttransfer (seconds) — load swings the absolute numbers ±30 % between runs, only the pairs are comparable:| repo (README lines, page bytes) | run | old p50 / p90 | new p50 / p90 ||---|---|---|---|| tracker (biggest, 1655, 1.07 MB) | load 59–65 | 2.169 / 2.461 | 2.053 / 2.387 || | load 34–60 | 1.499 / 1.786 | 1.411 / 1.740 || antcolony (1294, 1.0 MB) | load 59–65 | 2.322 / 2.833 | 2.328 / 2.691 || | load 34–60 | 1.596 / 2.017 | 1.552 / 1.983 || gitoria (355 KB) | load 59–65 | 0.680 / 0.801 | 0.676 / 0.920 || | load 34–60 | 0.491 / 0.582 | 0.479 / 0.629 |Server CPU per request (utime+stime of the server process / 15 requests, 3 rounds each; less load-sensitive than wall time):gitoria old 536/500/510 ms → new 441/459/466 (**−9 %**); antcolony old 1834/1880/1839 → new 1660/1722/1695 (**−8 %**); tracker old 1485/1314/1342 → new 1376/1323/1384 (≈ 0, noisy; an earlier 3-round run gave 1714/1608/1610 → 1445/1476/1466, −9 %).Honest reading: the cache removes the scanner, a gain of ~40–100 ms on the gitoria README and ~150–200 ms on the two big ones, but wall TTFB p50 improves only 0–6 % and is inside the machine noise. Why not the 26 % of W113: the parsed blocks are deep-copied on every binding (markdownBlocks result → `files.push` → `done` → `out` → return → `home` → `docs`, ~7 copies of the tree, each as costly as the cached value is cheap), and the rest (~90 %) is hl:web rendering/seed of the block elements. After this change `homepageNow` costs 110–200 ms on tracker (git ls-tree + cat-file spawns + sha256 + copies) of a ~1.9 s request. The remaining large cuts are in hl:web (copies in construct/hlLoad/seed, runSteps rows) = Arachne.## Proof 2 — rendered HTML byte-identicalNewest backup, two data copies, old and new server, 14 repos' homepages, `?v=` hashes, ports and the `hl-seed` script stripped, new fetched twice (first = miss, second = cache hit): all 14 `cmp` identical (antcolony 699 148, tracker 719 741, tickets 449 358, ident 312 387, gitoria 211 884, routger 206 487 … bytes; 3 repos without README 4 2xx). Same method as B1 (snap.sh).The `hl-seed` JSON differs between two requests of the SAME old server (key order / ids), so it cannot be compared byte-wise; it is not part of the rendered-HTML claim.Invalidation: README of `notes` changed by a real `git push` into the new server's copy → the next request shows the new paragraph, the unchanged old copy does not.## Proof 3 — gates (deploy.sh GATES, my ports 8900–8919, HL_PORT_BASE 8900)theme check rc 0; browser.mjs ×3: **232 passed, 0 failed** each; security.mjs **69 passed, 0 failed**. (Logs: scratch G3/s/g-*.log.) The README flow itself is exercised by browser.mjs (README tab, #homepage, edge Markdown).Old-code failing check: the cache has no UI behaviour to fail on; the measurable difference is the in-process parse time above (330–475 ms → 11–15 ms) and the CPU table.
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- 00517fafgitoria: shell 404 page for unknown paths (catch-all route, status 404, JSON 404 under /api), 390 gate checksMG
- d9e977f0reports/MG-mobile.md, LOGMG
- 2f2725actests/browser.mjs: commit-row check (one row, centred date)MG
- 4df1ea01tests/browser.mjs: MG phone checks (list first, no dead strip, one branch heading, tab grid, commit rows, PR title row, ticket columns, wrapping commands)MG
- c52424e9gitoria mobile: repo list before the forms, 3x2 tab grid, no duplicate branch heading, ordered commit rows, aligned ticket rows, pull title on its own row, wrapping clone commands, no dead strip under formsMG
- 3a95252dG3: cache parsed README blocks by sha256 of the text (bounded LRU), reportmre
- 570138cddeploy: security gate (tests/security.mjs)mre
- da6b20fcgitoria SG: security audit fixes (uploadMax 0, Secure cookie on https, session rotation at login, nosniff on function routes, no identity in page data) + tests/security.mjs gate + reportmre
- f98c981fgitoria B1: report wordingmre
- c6364cedgitoria B1: compact Markdown blocks (one kind flag per block/span, empty and false fields omitted); same rendered HTML, page values -67%mre
- cd99d2feWIP gitoria#22: always render the repo level's slot (missing-repo boot hang), pages render nothing without a repo; hydration diagnosis in reports/G2-hydrate.mdmre
- e5404b9breport: commit idsmre
- 63cfa21ereports/G2-repotabs.mdmre
- 9b0516fdgitoria#22: mark the tab underline functional (check-theme), chain E2E: serve/measure split, bring the lisbeth tab to frontmre
- 19bc1df8gitoria#22: all repo pages under ONE layout level (components/repo.hl, hl:web D-CHAIN): a tab click replaces only the page in the slot; head and tab nav stay the same DOM nodesmre
- 40658417tests/browser.mjs: wait for the page to be live (hydrated) before clicking Merge — a click on the server-rendered button before the client mounted was lost (flaky 'Clashing change' under load)mre
- 48a6154bre-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
- e972e8d7tests: short-id-switch (GITORIA_SWITCH_IDENT_PORT/_PORT) and ssh tunnel (GITORIA_GATE_TUNNEL_PORT) ports from env, defaults unchangedmre
- f06f5349re-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
- c7d3cc87docker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre