Skip to content

FIX: Remove runloop execution while waiting for stdin #27528

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

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

greglucas
Copy link
Contributor

PR summary

This would slow down the typing at a command prompt while waiting for stdin from the programs because each character would bounce for 0.01 seconds adding up to a noticeable slowdown when piping in characters from an external source. I thought this was needed while I was testing which is why I added that comment, but I just went through a few interactive test cases including the one from #26869 which all still worked interactively, and updated the display as expected. So I think we can safely remove it, but I'm not 100% on that.

The only way I could get this to fail was to interactively from my IDE "shift+enter" on the code blocks so that input was piped in. Is there a way to get that same effect in the interactive tests so we could add it there? Some quick tests with p.communicate() didn't slow it down for me in a script.

closes #27515

PR checklist

This would slow down the typing at a command prompt while waiting
for stdin from the programs because each character would bounce for
0.01 seconds adding up to noticeable slowdown when piping in
characters from an external source.
@jklymak jklymak merged commit 2e95cf2 into matplotlib:main Dec 16, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 16, 2023
QuLogic added a commit that referenced this pull request Dec 16, 2023
…528-on-v3.8.x

Backport PR #27528 on branch v3.8.x (FIX: Remove runloop execution while waiting for stdin)
@greglucas greglucas deleted the macos-interactive-prompt branch December 18, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Python interpreter becomes slow at reading inputs after plotting with matplotlib
3 participants