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

Enable --fast-exit by default to speed up mypy #11541

Merged
merged 2 commits into from Nov 14, 2021
Merged

Enable --fast-exit by default to speed up mypy #11541

merged 2 commits into from Nov 14, 2021

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Nov 13, 2021

This means that we kill the mypy process at exit instead of cleanly
freeing up memory. This speeds up mypy runs by ~10% in some cases
(with compiled mypy).

We've been using this internally at work for a long time without any
issues.

Previously the slowdown was visible as a small delay after the final
message from mypy was printed.

I measured the impact on a branch with some other optimizations as
well, so on master the fraction would be slightly less, as other
things would be slower.

This means that we kill the mypy process at exit instead of cleanly
freeing up memory. This speeds up mypy runs by ~10% in some cases
(with compiled mypy).

We've been using this internally at work for a long time without any
issues.

Previously the slowdown was visible as a small delay after the final
message from mypy was printed.

I measured the impact on a branch with some other optimizations as
well, so on master the fraction would be slightly less, as other
things would be slower.
@JukkaL
Copy link
Collaborator Author

JukkaL commented Nov 13, 2021

Related to #11547.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me / closes #6662

Note in that issue you expressed potential concern about impact on plugins. If you think there's actual any danger of breakage, consider posting in #6617?

@JukkaL JukkaL merged commit 053a1be into master Nov 14, 2021
@JukkaL JukkaL deleted the fast-exit branch November 14, 2021 10:42
@JukkaL
Copy link
Collaborator Author

JukkaL commented Nov 14, 2021

Added a comment to #6617.

tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
Closes python#6662.

This means that we kill the mypy process at exit instead of cleanly
freeing up memory. This speeds up mypy runs by ~10% in some cases
(with compiled mypy).

We've been using this internally at work for a long time without any
issues.

Previously the slowdown was visible as a small delay after the final
message from mypy was printed.

I measured the impact on a branch with some other optimizations as
well, so on master the fraction would be slightly less, as other
things would be slower.

Don't use --fast-exit for runs via the mypy api.
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.

None yet

2 participants