Skip to content

Very bad performance with SQLite cache (on a Linux machine with HDD) #21176

@ilevkivskyi

Description

@ilevkivskyi

I just tried a fresh install of mypy==1.20.0 on my machine with torch. The results are honestly disturbing:

(mypy_dev_3_12) ivan@x333:~/src/mypy$ time mypy -c 'import torch'
Success: no issues found in 1 source file

real	0m10.009s
user	0m7.900s
sys	0m0.252s

(mypy_dev_3_12) ivan@x333:~/src/mypy$ time mypy -c 'import torch' --no-sqlite-cache
Success: no issues found in 1 source file

real	0m7.975s
user	0m7.681s
sys	0m0.280s

SQLite cache makes type-checking 20% slower. I guess this is because I have an HDD as the system disk (and IIRC we only apply PRAGMA synchronous=OFF in parallel checking), but maybe there is something else.

@JukkaL @hauntsaninja just to double-check: did you actually do any performance measurements for SQLite cache vs FS cache? What are the results on your machines?

TBH at this stage I think we should revert the SQLite cache by default until it is "production-ready".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions