The reasoning for looking into this in the first place was to reduce
load times on a document with a large number of content-heavy tiddlers.
So we're loading tiddler contents on demand - in contrast to loading
entire tiddlers on demand, which has even more complex implications.
We've had to hijack and override a few core functions to make this work:
http://tinyurl.com/6apu97
(http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/tiddlers/plugins/skinnyPlugin.js)
(The implementation is very hacky at this point.)
Note that plugins/macros relying on tiddler contents (e.g. certain
ForEachTiddler macro calls) will have problems with this approach.
The problem here is that many functions (whether core or third party)
access tiddler properties directly rather than through a well-defined
interface, which means we can't intercept that access.
Also, there are certain tiddlers that must not be loaded on demand:
* plugins (evaluated on startup)
* shadow tiddlers (relevant to the page layout)
* themes (theoretically, this only applies to the selected theme)
(this list might be incomplete)
-- F.
We've come up with an concept:
#1 load document (including the essential tiddlers mentioned before)
#2 on load, fire off an XHR to retrieve all tiddlers in skinny form
#3 (optional) load tiddler contents in the background
With including the last step, we're losing the advantage of minimizing
the amount of data sent over the wire - however, it increases
responsiveness on startup and eliminates most problems with plugins/macros.
We haven't implemented this yet, but it sounds like it just might work...
-- F.
In this process, Simon has discovered that transclusion is problematic -
especially when used in a style sheet. So we might also have to hijack
getRecursiveTiddlerText and the tiddler macro.
-- F.
Actually. we might.
While reading an article explaining how accessors are basically
unnecessary in Python*, I realized that JavaScript is equally flexible.
So perhaps we could redefine the Tiddler class to use a function instead
of accessing properties directly.
I'm not entirely convinced yet that this is possible - not only because
we actually need asynchronous access - but wanted to throw it out there,
just in case...
-- F.
Actually. we might.
While reading an article explaining how accessors are mostly unnecessary