Skip to content

Cache only being for successful runs on unchanged codebase #12075

Open
@rijobro

Description

@rijobro
  1. Starting from scratch, mypy takes ~7 mins for our project.
  2. If mypy is successful, then the subsequent run of mypy takes ~14s if the code is unchanged.
  3. Upon introducing an error, we're back to ~7 minutes
  4. Re-running takes ~7 minutes
  5. Reverting the error takes ~7 mins again.

It seems to me, then, that even though only one line of code is ever changed, the cache is only being used for two identical successful runs. Is this correct?

Example:

rm -rf .mypy_cache
# 1. start from scratch
time mypy .
>> 7:24.29 elapsed
# 2. unchanged after successful run
time mypy .
>> 0:14.58 elapsed
# 3. introduce error
time mypy .
>> 7:04:94 elapsed
# 4. repeat with error
time mypy .
>> 7:07:32 elapsed
# 5. revert to fix error
time mypy .
>> 7:09:09 elapsed

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions