Salsa's fixpoint iteration is a very convenient feature to handle recursive queries as seen in astral-sh/ruff#20477. The caching of some of the type operations can also help with performance.
However, queries like is_redundant_with come at a high memory cost because there are simply so many instances that need to be cached.
We should explore adding within-revision LRU garbage collection to Salsa for queries that return values with lifetime &'static (and don't return references). That is, values that are copied or cloned and, thus, collecting them in salsa can't lead to dangling references.