On Friday, August 10, 2018 at 10:29:15 AM UTC-5, Edward K. Ream wrote:
*Summary*
>
> The fast-draw2 branch does expand-all about 10 times faster than the devel
> branch. In approximate order of importance, the reasons for the improved
> speed are:
>
I forgot to mention another big improvement. qtree.redraw_after_select no
longer redraws the outline! The following code indicates some of what
happens when the user holds down the down arrow key after expanding all
nodes:
import time
t1 = time.clock()
c.expandAllHeadlines()
t2 = time.clock()
print('expand: %5.3f sec' % (t2-t1))
t3 = time.clock()
tree = c.frame.tree
w = tree.treeWidget
n = 0
for p in tree.yieldVisible(c.rootPosition()):
n += 1
# From redraw_after_select...
item = tree.position2itemDict.get(c.p.key())
if item:
w.setCurrentItem(item)
t4 = time.clock()
print('%s nodes in %5.3f sec' % (n, t4-t3))
yields:
expand: 0.45 sec
9426 nodes in 4.00 sec
Of course it would take far longer than 4 sec. to move through a large
expanded outline node by node. Leo's selection logic recolors each body
text, for instance. Nevertheless, moving through an expanded outline does
not cause any further redraws.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.