You must review your application to find out what takes time.
Is it loading images? If so, then loading the default image and adding it everywhere in your view will be fast enough since you will only upload one image. Then you download and update the images on demand using idle_add , based on the images that should be displayed in the viewport.
If it takes time to add images to the model, you will need to add an on-demand add by checking what is visible on the viewport in the idle_add callback.
If both of them are slow, you will need a combination of both: download and add on demand.
Also consider a proxy design template that can be useful for creating a fake cover object that will load in the background and contain a download policy.
For signals, your GtkIconView widget implements GtkScrollable , which explains how to scroll . You have set the vertical setting and check when it has changed by connecting it to value-changed . This would mean that the user scrolls up or down, and you would need to start the timer with timeout_add . If after a short timeout (from 0.5 to 1 s, I think, but needs to be tested), the setting has not changed, this means that the user has stopped scrolling, and you can update the displayed one. Otherwise, it will be updated during scrolling, slowing everything down. You just need to figure out how to find which items appear in the viewport, update their cover.
I've never done this before, but I know a little bit of GTK and just tried to figure out how this would be done, so read this with some caution. In any case, the response to reactivity is “on demand”.
source share