hauntsaninja / mypy_primer

Run mypy and pyright over millions of lines of code
MIT License
55 stars 29 forks source link

Remove the performance regression comments #108

Closed JelleZijlstra closed 3 days ago

JelleZijlstra commented 7 months ago

We've had mypy-primer comment about type checking becoming faster or slower for a while now and in my experience, it frequently triggers incorrectly (most recently: https://github.com/python/mypy/pull/16488#issuecomment-1810466683) and never tells us something useful. I think we should remove these comments in the spirit of keeping mypy-primer's output actionable.

srittau commented 7 months ago

We could also define a threshold when to show this output. For example, if it got 1.5x slower or 1.5x faster to highlight potential problems. But in general I agree.

JelleZijlstra commented 7 months ago

There is already a threshold (1.05x): https://github.com/hauntsaninja/mypy_primer/blob/f02e889c8313b87df09578c7a3ce8af74a26136c/mypy_primer/model.py#L354. Possibly we could raise it, though I think I recall seeing spurious 2x performance changes too.

hauntsaninja commented 3 days ago

Removed in 49f8628