vaw Wiki
Reading preferences
Text size

Performance

On this page

Performance#

Run the synthetic benchmark#

The developer-only vaw-bench command creates deterministic vaults and writes a JSON report:

go run ./cmd/vaw-bench --sizes 100,1000 --json /tmp/vaw-bench.json

It supports 100, 1,000, 10,000, and 50,000 notes; run larger sizes separately when investigating memory use. The synthetic vault has a chain of real wikilinks, a referenced 1 × 1 PNG, and an unpublished note containing a unique privacy sentinel. After each build, the harness scans every generated file in bounded chunks and fails if that sentinel appears. It does not include the sentinel or private note name in the JSON report.

Each vault is built three times: a cold build, an unchanged warm build, and a build after editing one note. The cache lives beside the temporary vault and output, outside both. The report records actual cache-hit results. Today the unchanged build can reuse a verified output cache; a content edit misses the cache and performs a full rebuild. This is not dependency-aware incremental rendering.

The report includes build time in fractional milliseconds, cache-hit state, sampled process heap, allocations across the three build calls, generated file count and output bytes. Search and graph sizes sum their generated output directories and have availability flags. Heap sampling runs every 5 ms with samples at the start and end of the run, so short-lived peaks can be missed. JSON includes the Go version, operating system, architecture, and generation time.

Local baseline#

Measured on macOS ARM64 with Go 1.27.4 on December 5, 2026 UTC. Each size was run separately once. These numbers describe this machine and revision; they are not stable benchmark statistics or a comparison with another generator.

Notes Cold build Warm build Changed-note build Cache hits (cold / warm / changed) Files Output bytes Search bytes Graph bytes Total allocated Sampled peak heap
100 100.64 ms 15.36 ms 109.59 ms no / yes / no 361 8,006,877 26,318 53,022 155,325,256 B 13,144,520 B
1,000 725.75 ms 104.83 ms 945.71 ms no / yes / no 3,070 19,502,849 267,518 473,317 1,144,936,960 B 17,180,560 B
10,000 7,957.39 ms 1,287.09 ms 10,076.65 ms no / yes / no 30,169 137,301,045 2,724,770 3,421,283 11,090,155,632 B 133,021,704 B
50,000 75,577.27 ms 19,949.12 ms 89,518.19 ms no / yes / no 150,609 662,451,090 13,845,889 16,945,233 55,314,669,592 B 627,915,168 B

The complete machine-readable report for the 10,000- and 50,000-note runs is available in the vaw repository. Total allocated bytes are cumulative across three builds; sampled peak heap is a process-level sample and may miss short peaks.

Run a focused cached-build benchmark with:

go test -run '^$' -bench BenchmarkBuildCacheHit100Notes -benchmem ./internal/builder

Fuzz the bounded frontmatter, comment, slug, and glob parsers individually:

go test ./internal/content -run '^$' -fuzz FuzzFrontmatterParser -fuzztime 10s
go test ./internal/content -run '^$' -fuzz FuzzCommentStripping -fuzztime 10s
go test ./internal/content -run '^$' -fuzz FuzzSlugSegment -fuzztime 10s
go test ./internal/content -run '^$' -fuzz FuzzGlobCompiler -fuzztime 10s
Linked notes

Related notes

Linked from

Search is ready.

    ↑ ↓ move · Enter open · Esc close

    Explore graph

    Open the graph to explore note relationships.