Skip to content
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

Avoid slow error message logic if errors not shown to user #14336

Merged
merged 4 commits into from
Dec 26, 2022

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Dec 21, 2022

This helps with await-related errors introduced in #12958, in particular, which are expensive to generate. If errors are ignored (e.g. in third-party libraries) or we don't care about the error message, use simpler error message logic. We also often filter out error messages temporarily, so any effort in constructing a nice error message is wasted.

We could skip even more logic, but this should cover many of the important code paths.

This speeds up self check by about 2%.

@github-actions

This comment has been minimized.

@JukkaL
Copy link
Collaborator Author

JukkaL commented Dec 21, 2022

The mypy primer diff is unexpected, this shouldn't change output.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 5349f9a into master Dec 26, 2022
@JukkaL JukkaL deleted the faster-await-check branch December 26, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants