Replies: 1 comment
-
我不太熟悉textual,对于其他GUI框架来说,如果遇到了类似你遇到的这种性能问题,通常会采取“减少生成的UI对象”的方案。
很显然,这是一个复杂的过程 I'm not very familiar with Textual, but in other GUI frameworks, when encountering performance issues like the one you're facing, the usual approach is to 'reduce the number of UI objects created.' Let's say you need a listview that holds 1,000,000 items; generally, it's challenging for any framework to handle that. However, we can use a bit of a workaround: Calculate the maximum number of items that can be displayed on your screen at once — let's say 20. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm working on application that has vertical list of items which should be scrollable by cursor. Each item is a widget itself and contains about 10 sub-widgets. Here is a screenshot for better understanding: https://github.com/anlar/tewi/blob/master/docs/images/tewi-screenshot-1.png .
Problem is that with large number of items (500+) list become unresponsive. Container scroll itself works fine, but if I want to use cursor (selecting item, changing its style and manually scroll to widget location) it is slow.
I have tried both ScrollableContainer and ListView (former works worse). All obvious (for me) optimization are made:
Here is example app using scroll and list showing what app is doing:
So question is whether it is expected limitation for such large panels and I may not look further (and implement pagination for example) or I'm doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions