Wondering if there is a way to externalize and cache plugin resources (js, css, etc.) like external-JavaScript-template does?
Because I find that the size of the text I write is not even bigger than the size brought by the plugin, and since the core can be externalized, can the plugin be too?
Benefit:
Browser caching.
Combined with a plugin marketplace based on package management like npm can reference resource files from external CDNs.
Combined with lazy loading for minimal transfers.
Disadvantage: Impairs the integrity of tiddlywiki.
I know this may be a bit strange and OCD, but still want to discuss a possibility here, for the ultimate.
Others understand the technical implementation better than me, but I question if this is even relevant on TiddlyWiki, even if externalised the core javascript, both the Node and single file wikis are actually read into memory and runs from there, unless you implement skinny tiddlers which only load on opening, which I believe is not suitable for plugins. Even once loaded there are various indexed filter operators and more in memory to enhance access to key values see https://tiddlywiki.com/#Performance. Keep in mind the way tiddlywiki works, the way it refreshes according to relevant changes in any tiddler that is visible demands certain functionality to be present.
I understand that they all end up loaded into memory, I’m just inconvenienced with the huge, constant and unnecessary load in the transmission process, because I am used to hosting multiple tiddlywiki instances on VPS with node.js instead of using a single file. Fortunately, I seem to have stumbled upon a workaround.
It has the ability to integrate all plugins into one JavaScript file and import it from CDN. The following file was generated by removing the built-in core and importing it from jsDelivr according to its readme:
Hi,
This would be great for the huge plugins, e.g. those who use vis.js like Tiddlymap.
Tiddlymap is really great, but I integrate it rather seldom because of its size. I would love to have a version that loads when I want to work with it.
I know that @abesamma `s the Hopscotch-Tutorialmaker uses this trick. Though the demo is not functioning at the moment I have already seen it working.