perf(store): write resolver evidence straight into b-tree pages

Writing evidence row by row through SQL was the largest single cost of an index: 12.9 s of writes on django, 35.6 s on kubernetes. Rows now go straight to b-tree pages and digests run in parallel, the proof pool keeps a memo of the texts of a session, and hot keys no longer go through snprintf, which takes a process-wide locale lock on macOS. Writes take under 0.4 s on django and under 0.9 s on kubernetes. Databases shrink: kubernetes 4,364 to 4,162 MB, django 932 to 869 MB. Nothing readers use is removed; the same rows are stored.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
Martin Vogel committed 2026-11-02 22:04:45 +01:00
1 parent dcdf7a489a
commit 0091031542
18 files changed
+1387 -195

No files matched your search

+2 -2
View File
@@ -12,7 +12,7 @@ internal/cbm/lsp/c_lsp.c 4
internal/cbm/lsp/perl_lsp.c 21
internal/cbm/macro_table.c 1
internal/cbm/service_patterns.c 2
internal/cbm/sqlite_writer.c 74
internal/cbm/sqlite_writer.c 73
src/cli/activation_transaction.c 78
src/cli/agent_clients.c 73
src/cli/agent_profiles.c 7
@@ -68,7 +68,7 @@ src/pipeline/pass_importance.c 4
src/pipeline/pass_infrascan.c 2
src/pipeline/pass_k8s.c 6
src/pipeline/pass_lsp_cross.c 46
src/pipeline/pass_parallel.c 29
src/pipeline/pass_parallel.c 28
src/pipeline/pass_pkgmap.c 63
src/pipeline/pass_semantic.c 3
src/pipeline/pass_tests.c 3