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

Here are the details:

1.  The *only* way to get caching for a node is to add the @colorcache 
directive to the node.  Descendants do *not* inherit the @colorcache 
directive, and there is no @nocolorcache directive.  Besides being the 
simplest thing that could possibly work, I think it is perfectly 
reasonable: we expect most .leo files to have small nodes and adding an 
@colorcache directive to a node seems like a small matter.  This choice can 
be revisited easily if it causes problems.
    
2. Because caching now only happens explicitly, I removed the 
g.cache_color_info switch.  This should be perfectly safe: Leo's default 
operation will be no color caching.

3. The new code eliminates all the kludges from write_colorizer_cache and 
rehighlight_with_cache. In fact, it seems perfectly safe to save and 
restore the layout.additionalFormats info.  It looks like I mistakenly 
concluded that underlying data was being deleted.  The hard crash I took 
was most likely due to some other programming blunder ;-) This is very good 
news:  it means that *all* formatting information is saved and restored 
quickly, without having to understand its internal format. Similarly, the 
prototype read/write buttons in test.leo are as simple as possible.

At present, I plan no further color caching work: the present code is as 
simple as can be imagined.  But I'll be happy to revisit the code if there 
are problems.

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/-/GCrZ7gqedZMJ.
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