-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce size of JSON data in Mypy cache (#14808)
By default, Python outputs spaces after commas and colons when dumping JSON data. This is normally fine, but when exporting large amounts of JSON (such as cache info) it is more space efficient to export JSON without whitespaces. To do this, simply pass `separators=(",", ":")` to `json.dumps()`. Although the space savings aren't massive, they do reduce the size of the cache folder by a couple of megabytes: | Method | Size | |---------|--------| | Current | 31.2MB | | This PR | 29.3MB | For comparison, the size of the cache folder with the `--sqlite-cache` option is about 27.5MB.
- Loading branch information
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters