Skip to content- Sources: primary
- Summary: The post walks through how Salsa memoizes queries with revisions, dependency tracking and early cutoff when a recomputed dependency returns the same value. Because Salsa keeps memos in memory, Rust Glancer, a low-memory Rust language server, built Ajika on stable Rust to store query data on the filesystem, load it only while a query runs, and reload it after a restart.
- Why it matters: Builders of language servers and build tools get a worked comparison of in-memory and on-disk incremental computation, with Salsa, rustc, turbo-tasks and DICE as reference points.
- Background: rust-analyzer is built on Salsa, which records which inputs and queries each query read so that an edit only recomputes the affected parts. The red-green approach marks a memo valid again when its dependencies recompute to equal values, so expensive downstream queries can be skipped.