Give non-existent files a durability of at least Medium#14034
Give non-existent files a durability of at least Medium#14034MichaReiser merged 1 commit intomainfrom
Conversation
CodSpeed Performance ReportMerging #14034 will improve performances by 7.43%Comparing Summary
Benchmarks breakdown
|
|
carljm
left a comment
There was a problem hiding this comment.
So just to make sure I understand the effect here: module resolutions that only use typeshed files (but first have to verify that some first-party paths don't exist) will now be MEDIUM instead of LOW durability, meaning we won't have to re-resolve those paths on any change to a first-party file. Adding a previously-not-existent first-party file will count as a MEDIUM durability input change, and cause those queries to have to re-execute. Is that an accurate summary?
Looks good!
Yes, that's a perfect summary. |
Summary
Partially addresses astral-sh/ty#242
The solution isn't ideal, but our problem is that the module resolves first queries if certain first-party files exist and only then resolves the standard library modules. The issue with that is that any query that depends on a resolved standard library module now depends on non-existing LOW durability files, negating the benefit of giving standard library files high durability.
This PR changes the durability of the
File::statusto at least medium. This is still not perfect because it means that all standard library queries that depend on module resolution still have a MEDIUM durability instead of HIGH, but it's better than what we have today, and it should allow Salsa to take the "fast-incremental path" more often.This possibly helps with #14024
Test Plan
See benchmarks