Vertical Scroll slow when adding/removing visibility of its children with CSS class #5469
Replies: 1 comment 1 reply
-
There are a few issues here. You're using This wouldn't impact your slowness issue however. I'm assuming that updates become slow when the The solution I would recommend is to have a single threaded worker started in on_mount. This worker would wait for an asyncio event when new search term is available and post the results back to the widget. This would allow you to skip intermediate searches. |
Beta Was this translation helpful? Give feedback.
-
I have this small example app that lets me search trough the rows of a pandas DataFrame.
Each row is a HorizontalGroup. Together, they are organized inside a VerticalScroll.
When I search for a word, it goes to the
on_input_changed
method, and it adds/removes the visibility of certain rows via a CSS class.My issue is that when my DataFrame gets large (around 200 rows), this process becomes really slow.
I am wondering if there are ways to speed this up? Am I even on the right track with my approach?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions