At the moment, we use an untracted read when creating a salsa solver. That means that after every change (even a change in a comment), we re-create the solver. In the past week, we twice
saw cases where caching the solver more aggressively would be benefitial. That is, we implemented an (unsound) caching which invalidated solver only if the set of top-level items changed, and it led to noticible perf improvements.
I wonder what is our long-term plan here?
See https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Completion.20latency.3F/near/184906243 for the recent example where adding cache speeds up completion a bunch