-
-
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
check_overlapping_overloads is slow and often not needed #9691
Labels
Comments
Maybe disable the checks when checking stubs? We don't report errors in stubs, I think. Overloads aren't very common outside stubs. |
I think that something needs to be done to improve the situation, so I'm making this high priority. |
hauntsaninja
pushed a commit
to hauntsaninja/mypy
that referenced
this issue
Aug 4, 2021
Resolves python#9691 As mentioned in that issue, this is a huge performance win. On the codebase I'm currently working on, it halves a cacheless mypy runtime. The linked issue contains another measurement.
hauntsaninja
pushed a commit
to hauntsaninja/mypy
that referenced
this issue
Aug 4, 2021
Resolves python#9691 As mentioned in that issue, this is a huge performance win. On the codebase I'm currently working on, it halves a cacheless interpreted mypy runtime. The linked issue contains some more measurement.
msullivan
pushed a commit
that referenced
this issue
Aug 4, 2021
Resolves #9691 As mentioned in that issue, this is a huge performance win. On the codebase I'm currently working on, it halves a cacheless interpreted mypy runtime. The linked issue contains some more measurement. Co-authored-by: hauntsaninja <>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To Reproduce
With pure Python mypy:
The difference is substantial even for empty files. This would roughly halve the time it takes to run command line tests.
Proposal
As far as I can tell, check_overlapping_overloads does a lot of work to find problems which often don't get reported (and has no other side effects). Maybe we can just skip the call if
self.msg.disable_count <= 0
? But maybe this is a dangerous precedent to set.The text was updated successfully, but these errors were encountered: