-
Notifications
You must be signed in to change notification settings - Fork 243
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
[BUG] TextView performance regression with LinearLayout #728
Comments
Hi, and thanks for the report! I know about the performance issues of LinearLayout, and am still not sure how to fix that. I'm not sure yet how to get a one-pass layout logic to avoid this. Might have to redesign a bit the entire layout system to surface more information. :^S In the meantime, I'd be fine with some caching to improve the most common use-cases. |
Describe the bug
compute_rows()
method is called multiple times. In views with thousands of rows it causes significant performance issues. This issue is a twin of #582 (EDIT: one more: 698)To Reproduce
The easiest way to reproduce is here: https://github.com/night-crawler/cursive-lazy-text-view/blob/main/src/main.rs
(You can clone the full sample)
Expected behavior
Should be redraw rows without a need / that often.
Screenshots
Environment
locale
in a terminal):LANG=en_US.UTF-8
0.20
Additional context
When cached, it obviously becomes much faster (https://github.com/night-crawler/cursive-lazy-text-view/blob/main/src/ltv.rs#L378). If such a caching is acceptable, I can open a PR, or implement a better idea and open a PR.
The text was updated successfully, but these errors were encountered: