Le mer 25/06/2003 à 07:00, Guy Harris a écrit :
> It requires Ethereal to compute, for those columns, the pixel
> width of the column values for each row. At least as I infer
> from this note from a message by Olivier Abad:
>
> - the CList widget in gtk2 is slower, probably because gtk2 uses pango
> to display text (various messages on gtk-app-devel confirm this)
>
> that's more expensive in GTK2 than in GTK1. (Unfortunately,
> this *other* note:
>
> - the ListStore/TreeView replacement is painfully slow (also confirmed
> by gtk-app-devel archives).
>
> indicates that the obvious widget to use, in GTK2, for the
> previous paragraph's problem is slow. I just hope widgets such
> as Cocoa's NSTableView, QT's QListView, and so on are reasonably
> efficient if you have hundreds of thousands, or more, rows....)
The implementation I made using ListStore/TreeView for the packet list
was very slow, but it was probably not very efficient (I used the
ListStore/TreeView almost like a CList).
Havoc Pennington once suggested on gtk-app-devel to use a custom data
model in order to improve performance :
Le Ven 14/02/2003 à 19:48, Havoc Pennington a écrit :
> There are already at least two levels on which you can do a custom
> data model:
>
> - you can avoid TreeStore/ListStore entirely and do your
> own object providing a GtkTreeModel interface
>
> - you can have a single-column TreeStore/ListStore where the
> column contains a single void* pointing to a custom struct
> (gtk-demo has an example here I believe)
>
> GtkListStore is a linked list, and if you set a string on it for
> example it's going to copy the string. So if you stuff copy 8 strings
> per row into a giant linked list, it is not going to be fast.
>
> That's why custom models are allowed.
I didn't have time to try this yet, but it would probably be much better
than my first implementation.
Olivier
--
Connection reset by some moron with a backhoe