Use orjson instead of json, when available by hauntsaninja · Pull Request #17955 · python/mypy

@hauntsaninja

For `mypy -c 'import torch'`, the cache load time goes from 0.44s to
0.25s as measured by manager's data_json_load_time
If I time dump times specifically, I see a saving of 0.65s to 0.07s.
Overall, a pretty reasonable perf win -- should we make it a required
dependency?

I don't know if the sqlite cache path is used at all, but let me know if
I need a cleverer migration than renaming the table

@hauntsaninja

@hauntsaninja

hauntsaninja

@hauntsaninja

hauntsaninja

@hauntsaninja

JukkaL pushed a commit that referenced this pull request

Oct 17, 2024

hauntsaninja added a commit that referenced this pull request

Oct 20, 2024
For `mypy -c 'import torch'`, the cache load time goes from 0.44s to
0.25s as measured by manager's data_json_load_time. If I time dump times
specifically, I see a saving of 0.65s to 0.07s. Overall, a pretty
reasonable perf win -- should we make it a required dependency?

See also #3456

simon-liebehenschel