Skip to content

Benchmarks: 30,000-note reference corpora and the index's timings - #1289

Merged
vmillet-dev merged 2 commits into
dev/0.18.0from
bench/reference-corpora
Nov 3, 2026
Merged

vmillet-dev merged 2 commits into
dev/0.18.0from
bench/reference-corpora

Conversation

@vmillet-dev

@vmillet-dev vmillet-dev commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Closes #1154

Phase 1 (§ 6.1, § 6.3). Benches only: not in CI, like today's.

  • benches/reference.rs generates the two reference libraries on disk (never in memory), as § 6.1 describes:
    • realistic — 30 000 notes: 20 000 snippets (~1.5 kB, 8 languages, accents, {{fields}}), 5 000 Notes (~4 kB: headings, lists, tables, code blocks, a mermaid one in twenty), 3 000 lists of 20 items, 1 500 Calcul sheets of 30 lines, 500 Dessins (~20 kB scene); 4 spaces, 300 folders on three levels, 600 tags, 2 000 attachments; HTTP: 40 collections, 250 folders, 2 000 requests, 30 environments, 20 000 history entries, 500 cookies;
    • stress — 30 000 snippets of ~13 kB, the same HTTP.
      A Dessin carries its scene alone: its pictures are not what the index reads. The attachments go through attach_image, the service function.
  • benches/index.rs, groups index_build, index_query (unfiltered, search matching nothing, search folding accents, space + tag + pinned, list_tags) and index_refresh (update_note, a batch of 100), on both corpora.
  • Results in architecture.md → « The baseline » → « The index on the reference corpora ». Run once on the development machine while it was in use:
Measure Realistic Stress Budget
index built 1.87 s 2.98 s ≤ 1.5 s / ≤ 4 s
search matching nothing 12.1 ms 22.2 ms ≤ 50 / 120 ms
space + tag + pinned 3.0 ms 3.2 ms —
unfiltered 661 ms 289 ms —
search etape (most notes match) 701 ms 269 ms ≤ 50 / 120 ms
list_tags 7.6 ms 7.7 ms ≤ 5 / 10 ms
update_note 0.44 ms 0.56 ms ≤ 5 ms
tag + untag 100 4.2 ms 10.1 ms ≤ 30 ms

⚠️ Over budget: a query that keeps most of the corpus (the view of today's shape copies, decorates and cuts every kept card — Markdown outlines and Calcul evaluations above all; phase 2's NotesView of Arc entries and previews for drawn cards alone is the planned answer), the realistic build (1.87 s), and list_tags on the realistic corpus (7.6 ms). The search itself is inside its budget on both.

Local: cargo clippy --workspace --lib --bins --tests --benches --all-features -D warnings, cargo bench -p engine --bench index (above).

🤖 Generated with Claude Code

@vmillet-dev vmillet-dev added the test Test suites: coverage, structure, reliability label Nov 2, 2026
@vmillet-dev
vmillet-dev force-pushed the bench/reference-corpora branch 5 times, most recently from 420f892 to fa2a2b7 Compare November 3, 2026 04:58
Realistic and stress libraries of 30,000 notes with their HTTP side, built on disk; groups
index_build, index_query and index_refresh.
@vmillet-dev
vmillet-dev force-pushed the bench/reference-corpora branch from fa2a2b7 to af6bccf Compare November 3, 2026 04:59
@vmillet-dev
vmillet-dev merged commit c8b0904 into dev/0.18.0 Nov 3, 2026
@vmillet-dev
vmillet-dev deleted the bench/reference-corpora branch November 3, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test suites: coverage, structure, reliability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant