Re: Text Widget issues (forked from: Possible Glib BTree substitute)



> > associated with it).   I believe you have only counted "parent" nodes
> > above, 
[...]
> The lines themselves are the tree leaves, all nodes have between 6 and
> 12 children. The immediate parents of the lines ("level 0 nodes") 
> have lines as children, all higher-up nodes have nodes as children.

	Well, now, THAT clears things up.  I never noticed that the
TkTextLine had a *nextPtr, so I was under the impression that every node
had only one Line associated with it.  Crimony, I have been planning on
one node per line in my text widget...I'll need to make sure I'm not
killing myself on the memory usage.  

	I'll have to look over the re-balancing code again, to see how
TkTextLines are balanced between level 0 nodes, and compare that to the
skip list.

> See below for some memory use numbers.

	Thanks for the data.  It's very useful.  My current design is
(was?) expecting to have an extraneous "child_count" for every Line, but I
can get rid of that if I have multiple lines per nodes (ala TkText).  But
then I'd have to balance the nodes, which seems messy.  I'd like to try
for one node per Line, without wasting too much RAM.


--Derek



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