Re: Model/view ideas for GtkListBox/GtkFlowBox

2013-11-25 Thread Matthias Clasen
To get some idea what we are talking about here, I've started by writing a toy implementation of a list that reuses rows. You can find it here: https://github.com/matthiasclasen/list The example binary can scroll a 50.000 row list with labels or entries without noticeable problems. Lessons

Re: Model/view ideas for GtkListBox/GtkFlowBox

2013-10-24 Thread Alexander Larsson
On ons, 2013-10-23 at 13:16 +0200, Alberto Ruiz wrote: Hey Alex, I've been playing with this idea myself, have a look at this github repo[0], don't pay too much attention to the ListView widget, I'm pretty much replicating Gtk.ListBox for the sake of understanding how to implement such

Re: Model/view ideas for GtkListBox/GtkFlowBox

2013-10-24 Thread Xavier Claessens
I definitely second that. Empathy/Contacts can easily have between 1000 to 5000 rows and I've measured that widget creation (and destruction) in GtkListBoxRow is a real bottleneck. It's a bit hidden by folks having even worse performances, though (but it improved recently and I did not re-test).

Re: Model/view ideas for GtkListBox/GtkFlowBox

2013-10-24 Thread Jim Nelson
Shotwell uses a layered model approach for this problem. There's a signalled SourceCollection which contains all the objects known to the application, i.e. every photo in the library. Each page of the application (i.e. Events, Tags, Last Imported, etc.) has a signalled ViewCollection which

Model/view ideas for GtkListBox/GtkFlowBox

2013-10-23 Thread Alexander Larsson
More and more gnome apps are migrating to GtkListBox rather than GtkTreeView for lists, and we now have GtkFlowBox that replaces GtkIconView. These are nice for smaller lists, but with larger lists they are a bit heavy. We may want to look at optimizing whatever is possible, but at some point it