skinny tiddlers

11 views
Skip to first unread message

FND

unread,
Dec 4, 2008, 9:07:07 AM12/4/08
to TiddlyWikiDev
Simon and I have been experimenting with skinny tiddlers on ccTiddly,
and I thought we'd share what we've learned so far.
(It's just an experiment to explore the possibilities and obstacles.)

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.

FND

unread,
Dec 4, 2008, 10:37:56 AM12/4/08
to Tiddly...@googlegroups.com
> So we're loading tiddler contents on demand - in contrast to loading
> entire tiddlers on demand, which has even more complex implications.

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.

simon mcmanus

unread,
Dec 4, 2008, 12:28:32 PM12/4/08
to Tiddly...@googlegroups.com
I have moved the skinnyTiddlers code into a ccTiddly serverside plugin.

If anyone is looking for the latest code it can be found at :

http://svn.tiddlywiki.org/Trunk/association/serversides/cctiddly/Trunk/plugins/SkinnyTiddlers/

Its still very much a work in progress but I hope to make the example plugin available for ccTiddly 1.8.


Thanks

Simon





2008/12/4 FND <FN...@gmx.net>



--
Simon McManus

blog : http://simonmcmanus.com

simon mcmanus

unread,
Dec 5, 2008, 11:44:57 AM12/5/08
to Tiddly...@googlegroups.com
For those interested I have made a demo available of skinny tiddlers which uses an import from the tiddlywiki.org site.

http://latest.simonmcmanus.com/skinny

We still have many issues to sort out but you can see the skinny tiddlers being loaded lazily.

If you have any questions/comments please let us know.

Thanks

Simon



2008/12/4 simon mcmanus <mcmanu...@gmail.com>

FND

unread,
Dec 5, 2008, 12:45:34 PM12/5/08
to Tiddly...@googlegroups.com
> For those interested I have made a demo available of skinny tiddlers
> which uses an import from the tiddlywiki.org <http://tiddlywiki.org> site.

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.

FND

unread,
Feb 2, 2009, 6:44:35 AM2/2/09
to Tiddly...@googlegroups.com
> 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.

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.


* http://grahamweekly.blogspot.com/2009/01/bad-python.html

FND

unread,
Feb 2, 2009, 5:48:27 AM2/2/09
to Tiddly...@googlegroups.com
> 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.

Actually. we might.
While reading an article explaining how accessors are mostly unnecessary

Reply all
Reply to author
Forward
0 new messages