Tiddlywiki load times

I have a tiddlywiki that seems to take forever to load. Can someone suggest why and how I can speed things up…

http://cultconv.com/English/Conversations/MacQueen_Mary/TiddlyWiki/indexcopy.html

Bobj

1 Like

You’re right, it does! I nearly gave up while trying to load it to check it out—so my absolute first recommendation would be to use a splash screen, as tiddlywiki.com does, so your viewers know it will load if they’re patient.

  1. I didn’t look around extensively, but it didn’t look like you were embedding images. That’s good: if you were, I’d recommend replacing them with external images.
  2. I did notice you have an incredible number of tags (over 2000!) and many of your content tiddlers have dozens of tags. That’s a lot of upfront indexing (though it makes the site pretty responsive once it has initially loaded). You might consider whether it makes sense to store some of that information in other fields, where it will still be readily accessible by filters—and if you want to display, say, all people or places associated with a tiddler, you can do that (in a somewhat more organized fashion) with ViewTemplates.
  3. You’re a number of releases behind the current release (5.2.7). I’ve been upgrading more or less as new versions come out, and I’ve noticed some moderate performance improvements along the way. It might be worth upgrading your wiki just for that reason, even if you don’t need any of the newer features.

Just a few quick impressions! What’s your total file size, out of curiosity?

Edit: Forgot to say—this is obviously a great labor of love, and it’s very impressive!

It took me well over a minute to download your wiki (by right clicking and choosing save as on the link in your post). For a 4MB wiki that is extremely slow.

Once downloaded to my computer, your wiki loads instantly when I click on it. Your hosting service/server is what I recommend looking in to for the slow loading times.

1 Like

Saqimtiaz, you may be right. Here is another wiki I have been building,. I

Sorry, last reply hit send too early.

I have been playing with another wiki, SES triage — Triaging calls for help. This also loads slow and has only 4 content toddlers and about 5 tags.

The server does host a number of other web pages and they all load ok. So what in Tiddlywiki causes this slow down?

Try h

Try theinterviews.html. You can also try one of the interviews. All this loads fine.

Etardiff, I have been pondering your point 2. Can you describe how I would use view templates and putting the tags into field(s) to achieve similar behaviour to what is there now.

Bobj

The specifics would depend on your exact needs, but generally speaking:

  • Any tiddler with the $:/tags/ViewTemplate tag will be automatically rendered in each tiddler in the story river. This means that if you still want to have clear access to all the people/places/years/etc. referenced by a page, you could create a few new fields on each Page tiddler–maybe People Places Years, corresponding to tags you’re already using, and populate them appropriately. Then make a new tiddler with the $:/tags/ViewTemplate tag, perhaps something like this:
<$list filter="[<currentTiddler>tag[Pages]]" variable="display">

''People:''
<$list filter="[enlist{!!People}]">

* <$link><$view field="caption">{{!!title}}</$view></$link> <!-- or however you want to render each result -->
</$list>

... etc., for each new field

</$list>

A simple version like this would end up looking a lot like the manually curated lists you have in the body of each Page—and you could, in theory, replace those manual lists, though you’d probably want to merge e.g. Johnson Michael 1938-? and the currently non-tiddler tag Johnson Michael.

  • The advantage of doing it this way is that, unlike tags, you could customize the text that was displayed for each list entry in the ViewTemplate—so you could give the tiddler “Johnson Michael 1938-?” the caption “Johnson Michael”, or vice versa, or even use “Michael Johnson” as a caption, which will be displayed in links without disrupting your alphabetization by surname.

Or, instead of a link, you could use a button widget (which can look like a link) with a popup that contains a list of other Pages with that field content (<$list filter="[tag[Pages]contains:People<currentTiddler>]"/>, for instance) and/or other information (a transclusion of that person’s tiddler?)

If you did want something that looked and functioned just like normal tags, but in a different field, you might be interested in the GenTags plugin.

If you do decide you want to do any systematic restructuring (moving tags, adding or removing text to tiddlers in bulk, etc.) I recommend the Commander plugin. I also like SideEditor for working on templates, as it allows you to immediately see the results of your changes in context.

It seems your server has a setting to limit the data-transfer rate for individual files.

TW is an app and not a web page. So it needs to be loaded 100% to be started.

While the text of this page loads reasonably fast. The last element loaded is a PNG image with about 1MByte in size, which needs about 40 seconds on my computer.

So it seems to be a server side setting, that would need to be changed.

This issue with load times, especially with the SESTriage tiddlywiki, begs the question in my mind, how do other tiddlywiki’ers provide acces to their tiddlywiki’s. Are they loaded locally, ie from the device, or are they web mounted?

If web mounted, what have you done to minimise load times, it, as stated above, the whole file needs to be downloaded before rendering can occur?

Bobj

This isn’t a tiddlywiki problem as far as I can tell.

The wiki itself loads basically instantly once all the data is transferred.

There are basically two things you can do:

  • Make the wiki smaller. (I’ve seen webpages larger, so this is a last-ditch solution.)
  • Fix the server. I don’t exactly know what the issue is, but it is sending data over very slowly.

I’ve have local wiki’s as well as used tiddlyhost, firebase, and pages. All of them worked just fine. I’m not sure why exactly you are having this issue with the server.

Edit: I was curious, so I went to the root site, and basically every page loads at this speed, tiddly wiki is just a bit bigger, and browsers are good at caching images, so you don’t tend to notice on the smaller pages.

1 Like

Here’s one of my TiddlyWiki instances uploaded to Neocities.

BASIC Anywhere Machine

That is over 4MB.

Neocities is a static web server. No backend stuff going on. A link to any file on that web server does nothing more than get that file.

Try opening that TiddlyWiki instance to compare load time with your TiddlyWiki instance.

Charlie,

loading is almost instantaneous. So what did you do?

bobj

I solved a similar problem in the past with a free cloudflare CDN that caches the file on its content delivery network. Some hosts possibly already do this.

1 Like

Tony,

You still in Sydney? If so, can we get together for a chat? I’d be interested in exploring your knowledge of TW

You can call me on Redacted for safety

bobj

I did nothing at all. That is a stock TiddlyWiki, with the Relink, CodeMirror, and Details plugins.

So the TiddlyWiki HTML file hosted on the Neocities server.

Just to show: your bottleneck is your server. Nothing to do with TiddlyWiki, I strongly believe.

1 Like

Have been in discussion with my ISP and have also added a loading=lazy attribute to my <img src=… tags.

Can you have a go with

http://cultconv.com/English/Conversations/MacQueen_Mary/TiddlyWiki/index.html

and then try

http://cultconv.com/English/Conversations/MacQueen_Mary/TiddlyWiki/indexcopy.html

and see if there is any difference in loading.

t seems faster to me

bobj

I did not see much difference between the two, but anything over 5 seconds is often thought to be broke, I can’t recommend a splash screen more.

You can even tell them the truth in the splash screen like;

Please wait, loading fast interactive site, in your browser.

After loading once, it is much quicker as long as the wiki file does not change given its locally cached.

Currently, both links are consistently taking about 13 seconds to load each TiddlyWiki instance.

TW_Tones, I have been trying to figure out how to add a splash screen to the wiki or maybe a progress bar. Can not figure it out. Do you have an. Example you could send me.

Bobj