AndyObtiva / glimmer-dsl-libui

Glimmer DSL for LibUI - Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer! - No need to pre-install any prerequisites. Just install the gem and have platform-independent GUI that just works on Mac, Windows, and Linux.
MIT License
497 stars 15 forks source link

image_column is slow #38

Closed singpolyma closed 1 year ago

singpolyma commented 1 year ago

This may be a libui issue, I'm not sure yet. But when I have a table with ~100 rows and a single image column, just scrolling the table causes the CPU usage of the process to spike quite a bit and lag.

AndyObtiva commented 1 year ago

Thank you for reporting.

table is indeed meant to be used for about 100 rows only because that is about the max limit for when scrolling a table is user-friendly.

To combat any slowdown issues with a lot of rows (more than 100, or 100 with image columns), use refined_table instead, which paginates content by 10 rows per page or whatever number you configure per_page option with:

https://github.com/AndyObtiva/glimmer-dsl-libui#refined-table

Otherwise, I am aware that table has room for optimization to prevent scrolling from lagging. I have it in my TODO list.

I am going to keep this issue open until table performance has been optimized. In the meantime, hopefully using refined_table should be a good workaround.

AndyObtiva commented 1 year ago

Fixed in https://rubygems.org/gems/glimmer-dsl-libui/versions/0.6.0.pre.3

Table scrolling performance is now fast whether including images or not, and whether having thousands of rows or not.

I am closing this issue as a result. If you continue to have an issue, reply or re-open.