Server-side - load body on demand

9 views
Skip to first unread message

SlowBoatSam

unread,
Oct 4, 2006, 10:44:08 PM10/4/06
to TiddlyWiki
My html file is getting large and I was wondering if any of the server
side versions load the body of the tiddler on demand (rather than
loading everything at startup)?

Thanks,

David

Bob McElrath

unread,
Oct 4, 2006, 10:51:50 PM10/4/06
to Tiddl...@googlegroups.com

ZiddlyWiki currently loads only on edit or when it gets notified that
something has changed on the server. The capability is there to load
any tiddler, whenever you want. Several people have requested, but it's
not there yet...see:
http://ziddlywiki.com/#ZiddlyContributions
if you want to take a stab at it.

--
Cheers,
Bob McElrath [Univ. of California at Davis, Department of Physics]

A people that values its privileges above its principles soon loses both.
- Dwight Eisenhower

signature.asc

Simon Baird

unread,
Oct 5, 2006, 12:07:52 AM10/5/06
to Tiddl...@googlegroups.com

BramChen

unread,
Oct 5, 2006, 3:36:53 AM10/5/06
to TiddlyWiki

Simon Baird wrote:
> see http://lesserwiki.org/

Actually, I think Lesserwiki is not a TiddlyWiki adaptation, because of
it do not use TW core and store formatting, as the author of Lesserwiki
said, Lesserwiki is a "TiddlyWiki style" Wiki engine.

BTW, Lesserwiki is exactly a excellent wiki engine.

Andrew Lister

unread,
Oct 5, 2006, 11:21:46 AM10/5/06
to TiddlyWiki
Bob, could you explain "ZW currently loads only on edit"? I'd noticed
the "loading..." message. But surely it must load the tiddler when
viewed - I don't understand (no surprise!)

Also, if I 'view source' on my ZW site, I see all the tiddlers there at
the end of the file. Is that because the 'view source' command
actually sends a request for the whole file, whereas simply visiting
the site only loads tiddlers displayed by default, and as needed? But
if ZW is loading only on view / edit, then what changes would need to
be made to get "load on demand" ("load any tiddler, whenever you
want")?

I've hired a computing student to make the necessary changes to ZW, in
order to deal with this problem of large (i.e. very large) TW files.
But I'm not sure I've given her an accurate account of the current
situation - exactly what loads when and what needs to be done.

Bob McElrath

unread,
Oct 5, 2006, 12:01:09 PM10/5/06
to Tiddl...@googlegroups.com
Andrew Lister [lis...@post.queensu.ca] wrote:
>
> Bob, could you explain "ZW currently loads only on edit"? I'd noticed
> the "loading..." message. But surely it must load the tiddler when
> viewed - I don't understand (no surprise!)

All tiddlers are delivered to the client initially. So viewing
retrieves the tiddler from the local store and doesn't send a request to
the server. When editing it sends a "lock" message to the server to
prevent other people from editing it. This lock message is replied to
with the current text of the tiddler. (This is actually superfluous)
Simultaneously, we check for updates every minute and re-download
anything that's changed.

> Also, if I 'view source' on my ZW site, I see all the tiddlers there at
> the end of the file. Is that because the 'view source' command
> actually sends a request for the whole file, whereas simply visiting
> the site only loads tiddlers displayed by default, and as needed?

No it's because ZW currently delivers all tiddlers.

> But if ZW is loading only on view / edit, then what changes would need
> to be made to get "load on demand" ("load any tiddler, whenever you
> want")?

To load on demand you'd just have to change (at a minimum) the
TiddlyWiki object so that it can pretend it has all tiddlers. It would
need a list of tiddler names and revisions in any case. (currently in
zw.tiddlerList) You'd want to overload TiddlyWiki.fetchTiddler to send
an XMLHttpRequest. There might be a couple other places that need
modifying. In particular anywhere that uses getValue will need the
tiddler to actually be present. Also forEachTiddler would need to be
rewritten.

Another the hard part is to figure out what is a sensible subset to send
initially.

> I've hired a computing student to make the necessary changes to ZW, in
> order to deal with this problem of large (i.e. very large) TW files.
> But I'm not sure I've given her an accurate account of the current
> situation - exactly what loads when and what needs to be done.

Also see the recent discussion of some perl and ruby tools to manipulate
tiddlers -- might be good for your useage.

signature.asc
Reply all
Reply to author
Forward
0 new messages