gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmainfe209ffeMerge branch 'w56-owner-members' into mainGitoriamain/reports/W62-REPORT.md

10.3 KB

  1. # W62: README delays beside commit pages (gitoria#25)
  2. His words: "also loading the readme takes forever, thats already been fixed. now its back. this should take milliseconds, whats going on here?"
  3. On 2026-11-06 I measured main 53ca42b in the isolated worktree `/media/STORAGE/claude-scratch/gitoria/W62/wt`, branch `w62-commit-page`. No production change was made. No application change demonstrated the required reduction of at least half. The committed result is the measurements and a minimal Hybriel reproduction of a request blocking unrelated requests.
  4. ## Data and method
  5. I extracted only storage/git and storage/mpackdb from the newest backup, `gitoria.worldapi.org-20261105-0529.tgz`, into W62/data. The requested routger commit exists there: `50307fb70d28305efb345d6456ee12494a28840f`. Its `tests/subagents.mjs` contains 87 lines and 8,608 bytes. Every HTTP measurement used Host `routger.gitoria.test:8730` against port 8730. The application event sender was postponed with GITORIA_EVENTS_TICK=999999, ident and tickets configuration pointed to unused local port 8739, and watching was off. No .env, byrodin or live data was accessed. I deleted the extracted copy and generated session directory after stopping the servers.
  6. README.md says "Caches removed", but main still contains hpCache in lib/homepage.hl and mdCache in lib/markdown.hl. The former report reports their removal; reports/GC1-gitoria-cache-cleanup.md and missions/G25b-gitoria-readme-fast.md do not exist in this worktree. For every measurement I temporarily replaced both cache lookups with null, ensuring every request ran git and parsed Markdown. This is measurement instrumentation, not a proposed fix. All tracked application/framework instrumentation was restored. The preserved patch in reports/W62/instrumentation.patch.gz shows precisely what was measured.
  7. I timed every lib/git.hl run call, framework mounts, document View rendering, seedFor and HTML head assembly with hl:time now(), which has integer millisecond resolution here. Mount time includes the git calls and must not be added to their sum. The View measurement includes document body rendering and placeRegions; shell rendering done during mounts belongs to mounts. Seed measurement includes seedFor; HTML includes seed serialization and head construction. First-request compiler plan generation is visible in the seed samples. The application was allowed to finish its cold compilation before HTTP measurements.
  8. ## Single requests
  9. The first five requests per page gave these median times. Ranges and every sample are committed in reports/W62/measurements.json.
  10. | Page | Total median, range (ms) | Mounts (ms) | View (ms) | Seed (ms) | HTML (ms) | Git process count |
  11. | --- | --- | --- | --- | --- | --- | --- |
  12. | README `/` | 92.753, 58.314–319.609 | 45 | 12 | 1 | 0 | 3 |
  13. | Commit file | 137.256, 123.781–204.172 | 120 | 3 | 5 | 1 | 9 |
  14. | Commit reports directory | 24.932, 23.862–40.300 | 21 | 1 | 1 | 1 | 6 |
  15. The file URL was `/commit/50307fb70d28305efb345d6456ee12494a28840f/tests/subagents.mjs`; the directory URL ends in `/reports`.
  16. Every file-page git process, in execution order, is listed below. A second set of seven isolated requests after the load phases controls for timing drift. It ran the same code, with both caches still disabled. These are medians in milliseconds, not a before/after optimization.
  17. | Git process | Initial file | Later file | Initial directory |
  18. | --- | --- | --- | --- |
  19. | for-each-ref --count=1 (AddCode emptiness) | 13 | 5 | 4 |
  20. | for-each-ref branches | 11 | 3 | 3 |
  21. | rev-parse verify commit | 12 | 3 | 3 |
  22. | log -20 with SHA/date/author/subject | 13 | 3 | 3 |
  23. | cat-file -t | 11 | 3 | 3 |
  24. | cat-file -s | 11 | 3 | — |
  25. | grep -I -l text check | 16 | 4 | — |
  26. | grep -I -P -v -c UTF-8 check | 16 | 5 | — |
  27. | cat-file blob | 8 | 4 | — |
  28. | ls-tree -l | — | — | 4 |
  29. The three README git calls have initial medians 5 ms for for-each-ref, 4 ms for recursive ls-tree, and 4 ms for cat-file blob; later medians are 5, 4 and 5 ms. No content result was reused.
  30. For the initial file samples, the three largest non-overlapping measured groups are child-process calls (sum per request median 114 ms), seed creation (median 5 ms), and View rendering (median 3 ms). Mounts have a 120 ms median including the calls. Among individual operations, the two grep checks tie at 16 ms, followed by the emptiness check and git log tied at 13 ms. Later file samples have total median 38.691 ms, mounts 34 ms, View 1 ms and seed 1 ms. Later README total median is 89.171 ms, mounts 44 ms and View 12 ms; the worst later README is 291.803 ms. The large timing drift without a source change means a claimed speedup from these phases would be misleading.
  31. The HTTP sizes are README 275,173 bytes (seed 8,406), file 50,177 bytes (seed 27,103), and directory 70,076 bytes (seed 36,109). All responses were HTTP 200. The file and directory sizes agree closely with the reported live examples, but local latency does not reproduce the reported live latency.
  32. ## README contention
  33. I sent one file-page request per interval, then a README 25 ms later. This intentionally places the README near the commit request, rather than relying on chance overlap. The 35/min phase contains 12 file/README pairs over about 19 seconds; the 2/s phase contains 16 pairs over about 8 seconds. Requests could overlap; the client had 32 workers. Both phases are bounded and have finished.
  34. | Commit rate | Commit median / maximum (ms) | README median / maximum (ms) |
  35. | --- | --- | --- |
  36. | 35/min | 40.788 / 104.628 | 103.056 / 158.497 |
  37. | 2/s | 52.853 / 111.704 | 122.8515 / 146.962 |
  38. Verdict: the local rates did not reproduce a multi-second queue. README medians rose relative to the later isolated 89.171 ms, but these small samples and the timing drift do not establish that the scraper caused the live 15.7-second tail. That live cause remains unproven. A separate minimal reproduction does prove that a child-process wait in one page can hold an unrelated request behind it.
  39. ## Minimal reproduction and what Hybriel needs
  40. The committed `.scratch/w62-repro/` contains project.hl, index.hl, fast.hl and proc.hl. It has no git data, database, styles, classes, cache or JavaScript. Its `/` renders one paragraph; `/true` calls `/usr/bin/true` nine times; `/sleep` calls `/usr/bin/sleep 0.02` nine times. The sleeps demonstrate external-process waiting and do not create CPU load. The project uses port 8731 only. To rerun from this worktree, create `.scratch/w62-repro/plugins` as a symlink to `../../plugins`, then run `LC_ALL=C bin/hybriel .scratch/w62-repro/project.hl`. Send `/sleep`, wait 25 ms and concurrently send `/`.
  41. Five isolated requests gave medians of 0.377475 ms for `/`, 8.895935 ms for `/true`, and 194.605974 ms for `/sleep`. In the paired run, `/sleep` took 194.340680 ms; `/`, started 25.470388 ms later, took 168.908262 ms. Both responses completed within 0.038 ms of one another. The normally sub-millisecond request demonstrably waited for the child-process page.
  42. The separate proc.hl runs true twenty times without hl:web; individual now() measurements are 0–1 ms. Direct Python subprocess execution of the actual git commands took roughly 0.6–2.7 ms each, including startup, versus the application's 2–19 ms ranges. Direct git data is in reports/W62/git-native.json. These results show that the application's measured call cost is not simply git's repository work. They do not isolate whether the remaining overhead is fork cost for the larger app process, scheduling, or runtime allocation/collection.
  43. The vendored plugins/proc/proc.zig hl_proc_run synchronously forks, reads the exec pipe, polls output and waits for the child before returning. Hybriel should make this wait suspend the requesting fiber while the HTTP listener and other requests continue, preserving run()'s awaited result, timeout, stdin, output and error behavior. That needs a runtime/plugin implementation and regression test proving the unrelated fast request completes while the child is still running. Reducing fork/launch overhead in the large application process should be profiled separately; posix_spawn is a possible implementation to measure, not a demonstrated fix. No application workaround, cache, process pool or vendoring change was made.
  44. ## Validation, limits and cleanup
  45. `LC_ALL=C node theme/check-theme.mjs .` checked 86 files and reported 0 problems. tests/browser.mjs and tests/pr-page.mjs were not run: there is no proposed production code change or verified halving to validate. No Chrome was started or connected, and no tab or tunnel was opened. No browser proof or gate success is claimed. The minimal reproduction and HTTP tests establish server timing behavior only.
  46. DOCS: I used WORKER-RULES.md, the archived MANUAL.md and RULINGS.md, HL-PRIMER.md, hybriel/docs/CODE-ORDER.md, COMPONENTS.md, and the archived hl:web ARCHITECTURE.md (rendering, first-load seed and no cache rules), plus the actual proc/time plugin references. The requested app-local docs/CODE-ORDER.md does not exist; I read the Hybriel code-order document. No profiling guide was named in the available G25b report. The proc documentation says run holds the calling fiber, but does not document that unrelated HTTP requests wait; the repro records that gap.
  47. Stopped processes: initial attempted background startup PID 2374757 had already exited; compiling app PID 2377865 was stopped for the second cache-disable instrumentation; measured application PID 2385716 and minimal-repro server PID 2402257 were stopped by numeric PID after checking their cwd was this worktree. Measurement client PID 2382022 and the foreground followup/proc clients finished. The extracted backup and sessions were deleted. The final ss check found no listener on ports 8730–8739. No Chrome process was started.
  48. The mission used about 40 tool requests: roughly 12 for rules/source/backup setup, 17 for instrumentation and measurements, and 11 for followup, reproduction, cleanup and reporting. HTTP traffic was 15 initial samples, 56 load-phase requests, 14 later isolated samples, 16 isolated repro requests including readiness, 2 paired repro requests and 3 size requests. Native git timing used 40 processes. This was local-only traffic.
  49. What remains: obtain comparable per-phase measurements on an authorized deployment copy under conditions that reproduce the live tail, fix the Hybriel blocking boundary, and resolve the source/documentation discrepancy about the two application caches. None of those is claimed complete here.

Branches

Latest commits

  • fe209ffeMerge branch 'w56-owner-members' into mainGitoria
  • fa0754c8|||PR repository owner transfer and members API (#55)mre
  • 8862e537Merge branch 'w55-rename-org' into mainGitoria
  • 014d2b7fOne immutable readers snapshot per move for the left-organization event (#53)mre
  • 1859d506Decide who hears a repo left its organization by its readers before the move (#53)mre
  • 499f25f2Review fixes for the Settings organization move (#53)mre
  • ed3b922b|||PR move a repository into an organization in Settings (#53)mre
  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre