-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compress cached JSON files #15981
base: master
Are you sure you want to change the base?
Compress cached JSON files #15981
Conversation
This comment has been minimized.
This comment has been minimized.
At some point we should probably rename the |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do that in this PR!
This seems to introduce new issues (as expected), particularly when manually modifying/creating JSON files during testing. To get around this I should either make a `gzfile` directive, or add a `gzipped` flag to the `file` directive.
@hauntsaninja it would appear that some of the mypy tests rely on manually creating JSON files: mypy/test-data/unit/check-incremental.test Lines 3739 to 3742 in b327557
Now that gzipped files are expected, what would be the best way to get around this? One of the things I considered was adding a |
Diff from mypy_primer, showing the effect of this PR on open source code: graphql-core (https://github.com/graphql-python/graphql-core): typechecking got 1.05x slower (295.0s -> 311.0s)
(Performance measurements are based on a single noisy sample)
|
Since this breaks some workflows that parse or compress the mypy cache files, I wonder if this should be treated as a breaking change, which would benefit from a feature flag to enable/disable compression. In the first release with the feature we'd have the flag off by default, and we could turn it on by default in the next feature release. See our policy for backward incompatible changes for more information. |
Closes #15731