Skip to content

Query reconciliation

Preview — Ranvier is pre-release; its APIs may change.

Cost of three-query reconciliation versus a hand-written Elmish update, using the same index, section previews, word detail, and List.map patch. Both paths accept alternating edits to the first word; setup checks equivalent results and unchanged original data.

PreviewsHand-written meanQuery meanHand-written allocationQuery allocation
100.114 µs0.591 µs728 B2,704 B
1,0005.136 µs5.822 µs32,408 B34,384 B
10,00056.777 µs57.362 µs320,408 B322,384 B

Tradeoff: +0.476/+0.687 µs at 10/1,000 previews (+416%/+13%), and 1,976 extra bytes at every size, for staged atomic publication and superseded-request retirement. The reconciliation map shows those operations. At 10,000 previews, the 99.9% intervals overlap (55.674–57.879 / 56.230–58.493 µs); list rebuilding dominates.

Scope

  • Loaded entries, three-edit Commit, then reads of accepted fields. No subscribers.
  • Excludes IO, acquisition/disposal, Mutate tasks/FIFO, rendering, and adding words.
  • Untraced .NET 10; default identity equality, thread affinity, immediate dispatcher. Structural comparison, more edits, and expensive updaters add work.
  • The minimal hand-written baseline supplies no request sharing, cancellation, retirement, or failure recovery. This measures local overhead, not an application speedup.

Reproduce

Recorded 2026-10-05: Ryzen 9 9900X, Windows 11, SDK 10.0.401/runtime 10.0.12, workstation GC. BenchmarkDotNet 0.15.8, full configuration, UnrollFactor=16, MemoryDiagnoser; all six cases completed. Its host DEBUG label does not describe the separately compiled Release measurement process.

dotnet run --project bench/Ranvier.Benchmarks -c Release -- --filter "*QueryReconciliationBenchmarks*" --join

Harness: bench/Ranvier.Benchmarks/Queries.fs. Raw Markdown and full JSON: docs/.ai/benchmarks/results/Ranvier.Benchmarks.Queries.QueryReconciliationBenchmarks-report-*. Use the same machine, payload, equality policy, and configuration when comparing revisions.

Edit this page