[GeneralDiscussion] drop outline cache ?
[email protected] (simon)
| Newsgroups | gmane.comp.web.zope.zwiki |
|---|---|
| Message-ID | <20080312150351-0700__14472.4502614283$1205359600$gmane$org@zwiki.org> |
Zwiki stores the page hierarchy in two places. First, every page keeps a list of its parents, in a parents property. The hierarchy is built from this. Second - because the above data structure is not rich enough to tell us what we want to know (what are my children ? who are my siblings ? what's the first page in the wiki ?) without thrashing the zodb - we cache the same information in the outline object in the wiki folder. This stores the whole hierarchy in one place so it's easy to query efficiently. The outline object is generated on demand and kept up to date as changes are made in the wiki (in parallel with the parents property). I'm kicking around the idea of dropping the outline cache and keeping more detailed information on the pages - not only parents, but children and previous/next sibling. The downside of this is a lot of redundancy and (different) opportunities to get out of sync. Also you might have to touch a few more pages than before when making wiki changes. And I suppose we would have to index all these new pointers for efficient queries. The upside seems to be a simpler design that would be easier to self-repair and easier to upgrade. For example it would allow the upgrade to unicode to be handled automatically. -- forwarded from http://zwiki.org/GeneralDiscussion#[email protected]