On Mon, Nov 3, 2008 at 6:15 PM, Ville M. Vainio <[EMAIL PROTECTED]> wrote:
> There is a dir ~/.leo/filecache > > It has file named after md5 sums of the contents of files. Did you mean to say: The filecache has *files* named after md5 sums of the contents of *derived* files. ? > Every file contains a pickled version of data structure that allows > quickly building the nodes contained in the tree for that file (not > the actual nodes!. I understand you to mean that: - every file in the filecache corresponds to a version of a derived file - every file in the filecache contains nothing but the pickled data structure - pickling just simplifies the process of recreating the data structure. Presumably, there will be a mechanism for resolving checksum collisions. > E.g. > > [(node1-gnx, node1-head, node1-body, > [(node1.1-gnx, node1.1-head, node1.1-body, []), > [(node1.2-gnx, node1.2-head, node1.2-body, []), > (node2-gnx, node2-head, node2-body,[]), > ...] > > Where 1.1 and 1.2 are children of node1. All the vars are strings here. > > So, when a .leo file is opened, we md5sum all the external files (this > will work for shadow files as well). If we have the right pickle > available, we use it. If not, we proceed normally, but write out the > pickle. So, Leo will recreate the outline from the (unpickled) data, without reading any derived file? This could be a *big* improvement in speed compared with the corresponding leoAtFile.py read code! > You can always delete the cache. It only means that the next .leo file > will be slow to open the first time. Typically, though, the files > rarely change (and only few of them do at the time). And users rarely > have that many .leo files to edit. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. 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 -~----------~----~----~----~------~----~------~--~---
