Train v: web speed at 100k notes, delete race (#327, #448) #525

Closed
kayg wants to merge 0 commits from train/2026-10-17v into dev
Owner

Train v ran the full suite per project (11 projects), plus fmt, clippy, workspace tests and the build. fmt, clippy and the workspace tests are all green.

  • Passed: chromium-1440, throttled-390, throttled-1440, flow, passkeys, prefs-chromium, prefs-webkit and contrast.
  • First-run failures, all green on a 3x rerun:
    • missing-links:379 on chromium-390: 54 of 54;
    • tooltips on webkit-390: 9 of 9;
    • tree:176 on webkit-1440: 21 of 21.

Contents:

  • #518: web speed. The 100k cold TBT drops from 22.5 s to about 0.4 s on an idle host, with the stale-list guard kept;
  • #519: delete waits for the history writer, so a link read right after a delete never says New.

Merging.

Replaces #518 and #519.

🤖 Generated with Claude Code

Train v ran the full suite per project (11 projects), plus fmt, clippy, workspace tests and the build. fmt, clippy and the workspace tests are all green. - **Passed:** chromium-1440, throttled-390, throttled-1440, flow, passkeys, prefs-chromium, prefs-webkit and contrast. - **First-run failures, all green on a 3x rerun:** - `missing-links:379` on chromium-390: 54 of 54; - `tooltips` on webkit-390: 9 of 9; - `tree:176` on webkit-1440: 21 of 21. Contents: - #518: web speed. The 100k cold TBT drops from 22.5 s to about 0.4 s on an idle host, with the stale-list guard kept; - #519: delete waits for the history writer, so a link read right after a delete never says New. Merging. Replaces #518 and #519. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kayg added 18 commits 2026-10-17 07:06:34 +00:00
perf/web.sh measures the built app as production serves it on 10k and 100k
fixture Homes, Chromium (CPU 4x) and WebKit: bundle sizes, boot (TBT as
web.dev defines it, every long task, first paint, time to interactive),
keystroke to paint, the blaze test (#271), scrolling, memory, layout shift
and main-thread CPU. web.* budgets in perf/budgets.json; CI gates the
bundle sizes. docs/perf/web.md.

Replaces #360.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- frontmatterEnd walks lines without copying and remembers per document.
- The note metadata keeps `base` under its own key, written only when it
  changed (older records still read).
- A preview whose text matches the live document swaps its binding in
  place (a compartment) instead of building and parsing a new state.
- Clouds worked out in slices (lib/slices.ts), date labels morph only once
  tapped, the offline merge code loads only when a merge runs.

Replaces #402 and part of #454.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
- lib/notes-index.ts: notes newest first by binary search, tag counts,
  file to id, the Journal's order; views are told once per batch.
- groups() slices ordered lists by binary search; NoteList works out its
  visible rows from group sizes (lib/list-window.ts). Nothing walks every
  note on the main thread.
- The background fill (#422, pages of 2000) is fetched and parsed in a
  worker (lib/notes-fill.worker.ts) and handed over 250 notes at a time;
  without a worker, pages of 500 the plain way.
- The first note's text comes over plain HTTP (notes.peek) when nothing is
  remembered, instead of waiting for its room; peeks come 12 at a time.
- Typing: properties re-read only when an edit reaches them, the bar's
  block list replaced only when it held something.
- Theme colour once per frame; the Settings bar builds at the next idle.

Replaces #394, #407 and the rest of #454.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Fill pages are fetched by a worker now, whose requests the page doesn't
always see: the app marks html[data-listed] when the whole list is in, and
the harness waits for it (builds without the fill worker: request silence).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Test stale note lists deterministically
Some checks failed
CI / server (pull_request) Successful in 26s
CI / rust (pull_request) Failing after 2m4s
CI / web (pull_request) Failing after 47s
3c2c2bc040
Fix web speed train regressions
Some checks failed
CI / server (pull_request) Successful in 26s
CI / rust (pull_request) Failing after 1m53s
CI / web (pull_request) Failing after 34s
f20c348e29
fix notes delete link state visibility
Some checks failed
CI / server (pull_request) Successful in 36s
CI / rust (pull_request) Successful in 2m50s
CI / web (pull_request) Failing after 53m48s
7db5ab0533
Merge remote-tracking branch 'origin/issue/448-missing-flake' into train/2026-10-17v
Some checks failed
CI / server (pull_request) Successful in 30s
CI / rust (pull_request) Successful in 2m24s
CI / web (pull_request) Failing after 23s
a920947d38
Author
Owner

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.

This PR's commits are on dev (landed). Forgejo kept it open and its merge endpoint answers 405, so it is closed by hand.
kayg closed this pull request 2026-10-21 11:32:54 +00:00
Some checks failed
CI / server (pull_request) Successful in 30s
CI / rust (pull_request) Successful in 2m24s
CI / web (pull_request) Failing after 23s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!525
No description provided.