-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Don't fill out of viewport text #2611
Conversation
I've tested it with ~10k text widgets, containing I've attached some screenshots of the debug info, before ( 0.13.1 stable branch ) & after ( this PR's branch ), while scrolling or idling. There shouldn't have been too many changes in the dev branch ( 0.14.0 ) in comparison to the stable branch ( 0.13.1 ), so it shouldn't impact the fps too much. Though if it's the case, I can re-do the tests. |
Thanks for the detailed comparison. Render times are way down! |
IIRC, this might be fixed when Iced's glyphon has this: grovesNL/glyphon#108 Edit: This PR will still help though with primitive generation (particularly for a huge amount of small text widgets) I believe. The glyphon thing is more relevant for the editor and a single text widget with a huge amount of text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to cull primitives in column
and row
instead of text
. This way, we cull any primitive and all widgets benefit.
Let me know if that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Super smol optimization. There's no need to submit this rendering operation when text is out of viewport. In
halloy
we leverage this optimization and it has a huge impact on primitive generation timings when dealing w/ lots of text in a scrollable.