Open Telumire opened 2 years ago
I'm using it at a test wiki https://github.com/pmario/test and it works well and saving is very fast. index.html is about 110kByte, because the wiki also contains the browser-store plugin.
This already shows a major disadvantage. ... Plugins are part of the wiki and not of the external core.
... It is possible to add plugins to the core too, but then it would make CDNs useless, since we would need to prepare 1 version for every possible plugin combination, which doesn't make sense.
I also don't want to ping a 3rd party CDN provider everytime I'm using my wiki. So self-hosting or with eg: GitHub isn't a bad idea anyway.
I feel like 110kb as a starting size isn't bad at all, it's much better than 2MB. But yes it would be great to be able to do the same with plugins, keeping them in separated js or json files.. I imagine that loading times would be greatly improved and we would be able to store many more tiddlers.
I imagine that loading times would be greatly improved and we would be able to store many more tiddlers.
I think the behaviour is very nice. Especially saving is really fast.
it would be great to be able to do the same with plugins, keeping them in separated js or json files..
Just like to share that I made a plugin that allows you to select and export plugins into a separate JS. I've been happily sharing a 2 MB plugings JS file—in addition to the 2 MB tiddlywikicore—with multiple standalone wikis.
The plugin's demo page is served by loading plugins and tiddlywiki core externally.
Keep in mind you would need an upgrade strategy for the future. I usually acquire the upgrades by starting up the desired version of TiddlyWiki and plugins on node.js and export the JS files that way. Then I open my .html wiki files and manually update version numbers of the JS files to be loaded.
@cdruan wow your plugin is awesome ! I used it on my libro edition and the file size went from 3,24MB to 0,19MB !
https://libro-external-js.tiddlyhost.com vs https://libro.tiddlyhost.com
I have a suggestion : you should allow users to edit the path to the js files from the "usage" pannel, the tiddlers $:/config/ExternalJS/Prefix/Core
and $:/config/ExternalJS/Prefix/Plugins
are easy to miss. Maybe allow the user to fill in the path of the folder containing both js files ? In any case, thanks for this great plugin !
@cdruan is the developer behind externalizing core! So, he can be of much help here!
I myself like this approach very much! While all we know single file app (everything in one capsule) is one of the best and greatest features of TiddlyWiki, but flexibility to have external plugins/core lets to save a lot of diskspace for some real usecases. For example, for this semester I use TW 5.2.3 with 17 TW each for one student!
It is amazing to see Timimi takes automatic backup from .html without including the JS.
Great stuff, just consider being able to load a different core as per the TiddlyWiki version, maintaining back versions . Ideally this would be automatic, and please consider if the core can be switched to a new version later.
PR #7096 is out of draft now, (thanks again @cdruan). Reviews are welcome.
Tiddlywiki, even empty, is a bit big. The file size is not often an issue when used offline but when used online it slow down saving and make things like mastodon verification difficult.
However, the javascript core can be externalized as a single javascript file.
As of now, users need to manually download the tiddlywikicore.js from their wiki and host it somewhere themself. I think that serving the core over a free and open source CDN like https://github.com/cdnjs/packages would be very helpful and would help hosting services like tiddlyhost to cut down on bandwidth.
Maybe this could be automated ?
see : https://talk.tiddlywiki.org/t/discussion-how-to-reduce-the-size-of-your-tiddlywiki/5382/19