Pre-release Harn is pre-1.0 — the language, standard library, and CLI may change between releases. See the release notes

Code-index snapshot measurements

Measured for issue #9743, following the restoration measurements. The baseline is the final #9712 optimized release probe. The candidate replaces the JSON snapshot with a sectioned binary file, decodes and restores its sections in parallel, and uses a seeded fast hasher on the restore-path maps. The complete trial record keeps every trial, both binary digests, the seed digest, phase timings, and skipped-file inventories.

Workload and controls#

The corpus, fixture edits, 64-file selection, readiness boundary, and registered queries are the same as in #9712: 8,464 indexed files, 752,584 graph nodes, 5,036,843 edges, and 441,301 resolved calls. Each binary prepares its own snapshot from one shared JSON seed outside the timer, and pair order alternates.

These runs are on a shared host. CI jobs kept running on the measurement machine, because pausing its runners was not authorized for this session. Each trial waited for at least 60% idle CPU over three seconds, and the record keeps each trial's external CPU load. No trial met the 0.25-core external-load bound the #9712 protocol used, so every complete pair is reported and none is labelled accepted. Absolute times are therefore slower and noisier than the figures from issue #9712; the paired ratios are the result. A quiet-host rerun has not been done.

Results#

Ratios are the median paired candidate/baseline readiness with a 95% bootstrap interval from 10,000 resamples, seed 9743.

OperationBaseline medianCandidate medianPaired ratio [95% interval]Pairs
Unchanged restart5.154 s1.550 s0.308 [0.279, 0.339]5
Body edit on restart8.127 s3.470 s0.413 [0.382, 0.427]3
Declaration edit on restart8.422 s3.243 s0.408 [0.374, 0.459]3
Changed HEAD8.886 s3.543 s0.404 [0.321, 0.408]3
64-file reconciliation10.741 s5.405 s0.503 [0.497, 0.510]3
Resident body edit1.357 ms0.418 ms0.296 [0.266, 0.315]3
Resident declaration edit1.393 ms0.645 ms0.463 [0.268, 0.506]3
Cold build and persist27.295 s25.348 s0.959 [0.867, 0.995]3

Unchanged restart is about 3.2 times faster, and every restart workload is at least twice as fast. Every pair has identical corpus, graph, and posting digests and identical file, node, edge, and resolved-call counts, and every trial answers all four registered queries. The snapshot shrinks from 583,840,101 to 191,221,954 bytes. Peak RSS for unchanged restart falls from 1,089 to 993 MiB; edited restarts are within 1% of the baseline.

Where the time goes#

Median unchanged-restart phases, in seconds. Parallel phases overlap, so the rows do not sum to readiness.

PhaseBaselineCandidate
Read0.3500.112
Decode2.3840.362
Decode: graph section0.362
Decode: word section0.108
Decode: trigram section0.078
Decode: file facts0.062
Restore2.2780.994
Restore: graph1.5580.967
Restore: trigrams0.4980.345
Restore: words0.1930.185
Reconcile0.0620.058

Graph reconstruction is now the long pole: 0.97 of 1.55 seconds. Trigram and word restoration run beside it and no longer add to readiness. Graph decoding is the next largest phase.

After an edit, a restart also captures and rewrites the whole snapshot. The write falls from about 2.5 to 0.95 seconds, but capture (about 0.65 seconds) and write together are still nearly half of an edited restart. Cold build improves only through the faster write; parsing dominates it.

Residuals#

  • A quiet-host repetition of this matrix. These residuals are tracked in issue #9771.
  • Graph reconstruction. A validated immutable reader view over the snapshot would remove it, as described in the latency architecture.
  • Snapshot capture and write on edited restarts. Serializing from the live index without an intermediate copy, and persisting after the index is published, would remove most of it.