mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-26 06:43:15 +08:00
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>