Re: Possible Glib BTree substitute

> I'll let Josh or some other expert comment on the data structure in
> general, but some notes with respect to my text widget:

	Just to be clear: I never meant to imply that the BTree is causing
any slowness in your text widget.  You, and Brent Welch (from the Tk team) 
have both previously informed me that the TkText BTree is not a

	I am using the skip list in *my* text widget because (a) I wanted
to learn more about skip lists and (b) I found it easier to visualize the
data that way.  Also, I thought that writing a re-usable Glib-style data
structure would be educational.  It has been.

	I am only submitting this because I think it could be successfully
used in projects where the data struct *is* a bottleneck, and Glib does
not current have a fast searching data structure other than the binary
tree.  Also, I think it may be a better addition to Glib than, say, an AVL

> Some thoughts. Anyway, basic points are:

	Thanks for the comments!  I'll consider them as I continue
development of my text widget.

>  - the BTree code in the Tk-based widget could use a good cleanup, 
>    and a generic glib-style container is likely a good start.

	This was another motivation behind the GSkipNode.  I wanted to
have my data structure be generic and reusable, so between Glib-ing the
TkBTree and writing the GSkipNode code, I chose the latter.

	Thanks again for comments, they are very helpful for me.


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