This Engineering Notebook post is, even more than usual, notes to myself.  
Feel free to ignore.

BTW, the "devel" branch now supports the --trace-cache option.  This 
clarifies what is going on considerably. At present, cacher.dump actually 
displays the contents of the files cache.  So --trace-cache could print a 
lot, in devel.  This point will become (largely) moot, but for now it could 
cause problems.

The no-sax branch is based on the fast-read branch.  It has the following 
aims:

1. To eliminate all uses of Python's sax-based xml read code, using 
Python's ElementTree lib instead.

2. To eliminate all *file *caching associated with external files generated 
from @file trees, and *maybe* to eliminate file caching associated with 
@auto trees.  I'm not sure whether external files generated from @clean 
trees are cached, and it probably doesn't matter much.

Caching is unexpected tricky.  It's not clear exactly *what* should be 
cached and *when*.  

Here is a list of things I think I *do* know for sure:

1. Regardless of whether Leo caches the contents of files (in the file 
cache), Leo must cache all information in c.db in per-file caches.

2. The data in <global> elements of .leo files is also cached in per-file 
caches. At present, these entries do *not* have a "leo_" prefix.  They 
probably should.

3. The global cache, in .leo/db/global, caches g.app.db.  It has nothing to 
do with caching data in 

4. Plugins are free to set either g.app.db or c.db, as they choose.  Any 
changes to caching should be invisible to plugins.

5. The --no-cache command-line option and the g.enableDB switch will 
probably *never* go away.  Removing this switch would have a real, albeit 
indirect, effect on plugins.  Running without cached data will always be a 
useful option.  Plugins can rely on this feature.  It is also useful for 
testing.

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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to