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

v0.75.0 has massive slowdown #4832

Closed
paulrobello opened this issue Aug 2, 2024 · 5 comments · Fixed by #4833
Closed

v0.75.0 has massive slowdown #4832

paulrobello opened this issue Aug 2, 2024 · 5 comments · Fixed by #4833

Comments

@paulrobello
Copy link

Running Python 3.11 on Windows 11 using Windows Terminal Version: 1.20.11781.0
Works properly on textual v0.74.0.
Click around on various list items, the responsiveness of the app is very poor.
I believe the issue is that v0.75.0 changed the way Enter and Leave events bubble.
I don't know that the issue is limited to lists. It most likely would occur with any significant number of widgets.
If you uncomment the on_enter and on_leave handlers which stop the bubble a lot of performance is restored.
MRE
https://gist.github.com/paulrobello/cc9de493940f985e8622b4ca4e9a0597

Copy link

github-actions bot commented Aug 2, 2024

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

@davidfokkema
Copy link

If enter and leave events are indeed the culprit, maybe bubbling of those events should be optional and off by default? Or if you really need it, handle it in the widget you're interested in and call a .bubble() method on it? That won't work if you want to watch a built-in or third-party widget from 'outside'... Maybe a method to add a watcher for these kinds of events? That may be a complex change.

Copy link

github-actions bot commented Aug 2, 2024

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

@willmcgugan
Copy link
Collaborator

Thanks for the MRE. Please try Textual v0.75.1

The issue was that since Enter and Leave bubble now, an additional check is required to see if the event came from the current widget or a child.

@paulrobello
Copy link
Author

Confirmed fixed with v0.75.1

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 a pull request may close this issue.

3 participants