On Sun, Oct 5, 2008 at 3:09 PM, Edward K. Ream <[EMAIL PROTECTED]> wrote:

> It may be worthwhile to really provide methods to set node /
>> subtree "dirty", so only that part of the tree would need to be
>> regenerated. Moreover, if clones are detected, the subtrees of all the
>> clones would need to be recreated as well.
>
> This seems like an heroic solution if done in Leo's core.  Another
> possibility would be to try to compute the diffs within
> leoQtTree.redraw_now.  For now, I'll leave possible optimizations to
> you.

Ok, here's a simple plan that should work:

subtree_changed_tnodes = set()

- When a tree-changing operation happens, we add the tnode of the
parent (subtree of which needs to be created) to the set

- Then, it's just a matter of maintaining a dict that maps tnode to
list of positions (all clones), iterating though
subtree_changed_tnodes and using the dict to re-create the dirty
subtrees, skipping invalid positions.

-- 
Ville M. Vainio
http://tinyurl.com/vainio

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to leo-editor@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to