On Wednesday, October 3, 2012 4:46:29 PM UTC-5, Edward K. Ream wrote

> Rev 5482  contains major improvements to the color caching scheme. Please 
test it and report any problems immediately.

A note about performance.  The code that saves and restores formatting data 
is quite fast; they take about a tenth of the time it actually takes to 
redraw the body text of a node.  Alas, this does not speed up node 
selection as much as I had hoped.

Indeed, even if restoring the syntax coloring data took *no* time it would 
still be fairly expensive to redraw all the text of a large node.  As most 
of you no doubt know, rendering text is a fantastically complicated 
affair.  The Qt rendering code is written in C++, but even that code takes 
more time than we would like.

As Ville and I have both pointed out, selecting a large node is similar to 
loading a file in a vim or emacs buffer.  Users don't notice the slight 
delay in colorizing those buffers because the initial (slow) colorizing 
happens only once.  So it would be if you only stayed in a single node with 
Leo.  When inserting or deleting lines or characters, Qt (or vim or emacs) 
can blit bits around in the video buffers, so such operations are quite 
fast.  But there is simply no alternative to loading the buffers initially.

One last thing.  At present, color caching speeds up Leo when you move 
*past* a node.  But when you start editing a node Leo must once again fully 
re-init the Qt colorizer, which takes time.  So typing the first character 
*must* be slow, but after that typing will be fast again.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/leo-editor/-/S-RjLuzjE7EJ.
To post to this group, send email to [email protected].
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