EggSequence

2007-01-26 Thread Soeren Sandmann
Hi, A long time ago I wrote GSequence for the purpose of speeding up Nautilus, which at the time was spending large amounts of maintaining sorted lists of file. GSequence is a data structure that implements the API of a list, but represents it internally as a balanced binary tree. This allows thin

Re: EggSequence

2007-01-27 Thread Jean-Yves Lefort
On 27 Jan 2007 03:01:03 +0100 Soeren Sandmann <[EMAIL PROTECTED]> wrote: > A long time ago I wrote GSequence for the purpose of speeding up > Nautilus, which at the time was spending large amounts of maintaining > sorted lists of file. GSequence is a data structure that implements > the API of a l

Re: EggSequence

2007-01-27 Thread Hans Petter Jansson
On Sat, 2007-01-27 at 03:01 +0100, Soeren Sandmann wrote: > A long time ago I wrote GSequence for the purpose of speeding up > Nautilus, which at the time was spending large amounts of maintaining > sorted lists of file. GSequence is a data structure that implements > the API of a list, but repres

Re: EggSequence

2007-01-27 Thread Soeren Sandmann
Hans Petter Jansson <[EMAIL PROTECTED]> writes: > I'm not sure it's correct to call it an iterator when it's just a > pointer to an internal data structure node. When a node is freed, any > iterator pointing to that node will be freed as well, and that might not > be what the user expects (e.g. sh

Re: EggSequence

2007-01-28 Thread Hans Petter Jansson
On Sun, 2007-01-28 at 01:50 +0100, Soeren Sandmann wrote: > Hans Petter Jansson <[EMAIL PROTECTED]> writes: > > I don't think more robust iterators are worth the overhead for this data > > structure, but would you consider calling them items instead of > > iterators? I think it'd avoid some confus

Re: EggSequence

2007-01-28 Thread Jonathan Blandford
+1 to seeing this in glib. On Sun, 2007-01-28 at 01:50 +0100, Soeren Sandmann wrote: > Hans Petter Jansson <[EMAIL PROTECTED]> writes: > Well, they are actually _more_ stable than other things we call > iterators. GtkTree- and GtkTextIters become invalid as soon as you > make _any_ change to the d

Re: EggSequence

2007-01-29 Thread Soeren Sandmann
Hans Petter Jansson <[EMAIL PROTECTED]> writes: > > (In retrospect using a splaytree was probably not a wise decision. A > > red/black tree might have been better, even though it would have a > > code-complexity cost in some areas). > > Could we change the implementation (say, to RBT) without int

Re: EggSequence

2007-01-29 Thread Hans Petter Jansson
On Mon, 2007-01-29 at 20:59 +0100, Soeren Sandmann wrote: > Yes, I think the implementation can be changed without API changes. > > If at some point we implement the aggregates that Jonathan mentioned > it would make a lot of sense to also move to a red/black or a btree at > the same time, since

Re: EggSequence

2007-02-03 Thread Soeren Sandmann
Soeren Sandmann <[EMAIL PROTECTED]> writes: > If accepted, I'll write API documentation and port GtkListModel to use > it. There is already a through testsuite SVN. I wrote API documentation and committed it. Changes since last time: - Fixed a couple of bugs where the sequence would try

Re: EggSequence

2007-02-13 Thread Jean-Yves Lefort
On 04 Feb 2007 00:30:54 +0100 Soeren Sandmann <[EMAIL PROTECTED]> wrote: > Soeren Sandmann <[EMAIL PROTECTED]> writes: > > > If accepted, I'll write API documentation and port GtkListModel to use > > it. There is already a through testsuite SVN. > > I wrote API documentation and committed it. May

Re: EggSequence

2007-02-13 Thread Soeren Sandmann
Jean-Yves Lefort <[EMAIL PROTECTED]> writes: > Maybe you can explain how the name "sequence" is more appropriate for > your container than for a GList, GSList, GQueue, GString, GArray, > GPtrArray or GByteArray? It is not. I don't think GSortedList is accurate either, since a GSequence does not h