Files
codebase-memory-mcp/src
Martin Vogel f10b37563b perf(rust-lsp): build the shared all_defs registry lazily, once-guarded
Follow-up to the conditional shared registry: the eager pipeline.c build paid
the O(all_defs) construction and a multi-million-entry registry RSS on every
run that contains rust files, even when every rust file filters to a proper
import subset and the shared registry is never consulted. Build it lazily
instead: the first worker that hits a NULL-filter rust file takes a mutex,
double-checks, builds into a dedicated arena, seals and atomically publishes;
later null-filter files reuse it and subset files never trigger it. Verified
the build fires exactly once (scale log: types=2320 funcs=8860 on the kernel
rust subtree) and the shared-path unit test still resolves identically to the
per-file build.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
2026-07-06 19:31:37 +02:00
..