Re: [gtk-list] Performance characteristics of gtk_container_add for GtkList



>  Can anyone give me a rundown of the performance characteristics of
>  gtk_container_add for a GtkList? I only recently realized that a
>  g_list_append is an O(n) rather than O(1) operation, and am a bit
>  spooked.

Appending stuff to a GtkList is O(n).  Yes, this is a bug.  (This is
completely orthogonal to glib's data structures, i.e. g_list_append(),
in which it is *not* a bug, but I assume you meant GtkList instead of
GList).

In any case, if you are having performance problems, then it very
likely means that you have a lot of items in your GtkList.  You should
use GtkCList instead if possible.

  Federico



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