Long text in a scrollable
First, apologies for not having a very thorough report/question. I've read through a few other text issues and I imagine this falls under the same grouping as (what seems to be) a future planned rewrite of text rendering components.
I initially had a Column with Text elements inside a Scrollable, using it to display logging/event messages. I don't know the exact breakpoint, but with 7829 lines (of which 14 are visible) the entire UI becomes nearly unresponsive. Concatenating the lines ahead of time and displaying them in a single Text element produced the same result.
I haven't had a chance to explore too deeply yet. I'll have to come back and provide a minimal reproduction. At this point I'm just wondering if this is primarily my fault, or if the current framework actually can't handle ~8k lines of text.
No need to apologize!
At this point I'm just wondering if this is primarily my fault, or if the current framework actually can't handle ~8k lines of text.
It's not your fault. The library as it stands cannot handle this kind of workload.
Performance has not been a main priority so far and, as a result, most of the current widgets are not designed to satisfy these kind of use cases.
For this particular use case, I imagine we will eventually have a different Scrollable widget with a retained API that actually owns its contents instead of recreating them in every view call. This should allow us to control updates, cache layout more efficiently, process events smartly based on cursor position, and finally render only what is visible.
If you want to know more, there is a discussion over Zulip about an InfiniteList widget.
Thank you for the rapid response!
I'm a little relieved. Aside from little corners like this, I've found the framework quite pleasant to work with. Now I just need to acquire sufficient knowledge + skill + time to contribute to it and help make the improvements I'd like to see.
I think this should now be closed. Just tested a 12k line file on master and it works just fine even with a debug build! 🎉