Write errors to a separate cache file#21022
Conversation
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
JukkaL
left a comment
There was a problem hiding this comment.
I wonder if we should turn on sqlite cache by default now, since this will likely have a bigger overhead on systems where sqlite cache improves performance (e.g. macOS, systems with endpoint security software).
Can you make a more precise measurements on Mac? I am curious how much of impact this will have there. In any case, I am not against sqlite cache. I will leave the decision on when exactly to flip the switch to you. |
|
Ok, I'll run some benchmarks and make a decision about turning on sqlite cache this week. |
This is needed for staggered interface/implementation processing in the parallel checking.
Implementation is straightforward. A non-trivial part is that it looks like we need to always write/read errors file, even if empty. Otherwise we risk getting into a stale state in some edge cases. This adds few milliseconds warm cache runs, but still under noise level for both self-check and
-c 'import torch'.