GtkIconView performance issue

Hi everyone,

I'm trying to use GtkIconView to display a 2-column grid of icons,
containing thumbnails of images in a directory. At around 500 rows in
the model, I'm having a performance problem. As the thumbnails are
generated, I update the model, and that causes GtkIconView to spend
around 400 ms doing something each time. The UI becomes really slow to
respond, and especially scrolling the IconView is very stuttery. After
all the thumbnails are done and the model isn't being updated, it's
super smooth.

The thumbnail generating is how I noticed the issue, but it happens in
a simple test case that updates the text column of the first row
repeatedly. Also, it seems to happen when changing window focus.
GtkTreeView, however, is fast.

I found this blog post[1] which I think means that the cause is
GtkIconView calculating the sizes of all the rows in one go, instead
of progressively like GtkTreeView. Has there been any progress made on
progressive calculating for GtkIconView? Is there any workaround I can
use? If a fixed item height would be faster, that might be okay, but
I'm not sure how to make GtkIconView use one (there's an item-width
property, which I already set, but there isn't an item-height).

I'm using C++/gtkmm, by the way (but have tested the performance in
plain C, just to be sure). I can attach the test case if needed.
Thanks for any help!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]