I think, comparing those 2 apps is not really fair. It’s a bit like to compare a “Word” with “Notepad”.
IMO it depends, what is lightweight for you?
If TW is sent in a compressed way over the wire the core.js is about 390kByte and the data.html is about 25kByte (data.html) … Including full functionality.
So if data volume, that needs to be transferred is a problem, it’s mainly a configuration setting of the server host.
If data stored on the disk is a problem. I do have a question? … On a mobile phone. How many “snapshot” images do users store? … If the answer is 3. Then it’s about the same size as the wiki at tiddlywiki.com including all the content.
So if 2 images are a problem, then yes. TW in the current format is a problem.
It is possible. If someone would pay for the development, it should be doable. But I think it wouldn’t make much sense. …
As you know, an empty wiki minified is about 1.3 MByte in size. …
empty.html is 2.4 MByte
The following values are plain text. … So not minified.
- removing the encryption library would save us 25 kByte
- There are about 100 button images as SVG, where each of them is less then 1kByte
- So removing 50% of them for (view mode only) can save 50kByte
- language tiddlers contain about 80kByte of text.
- So compiling a “super custom version” which only contains the target language for the UI text will save us 80kByte
- There are 18 pallet CSS tiddlers 4kByte each. … If we only add 2. 1 dark, 1 light. I will save us about 60kByte
- Removing all the node-js server command line commands will give us about 40kByte
- Removing all the redundant default saver modules (~2k each) will save us 25 kByte
- default and WebDav saver only
- Removing all the nodejs - server code gives us 29 kByte
- publishing with classic-storyview only will save us 11 kByte (zooming view needs 8k)
- The whole TW UI tiddlers are about 300 kByte
- Compression (make it unreadable for humans) could give us about 100k
- Removing the editor code will give us 40kByte
- Yes. The core editor specific code is probably a bit more than 40 kByte.
- In TW everything is highly reusable.
That’s basically it. The rest of the code is widgets. We can’t really remove them, because the UI would be not be possible anymore.
So in sum, I think there is a potential of saving 400kByte – plain text code – which will result in a highly “crippled” version of TW. … No edit, 2 pallets, No theme switching,
Probably 3 Month of full-time work to make it work again and 3 month of changing the docs, to describe what doesn’t work anymore. … The result will be an incompatible TW version.
So if a user adds 1 image which is 500kByte in size, all the optimizations are gone. For reference an image on a today’s phone is at least: 2MByte. JPG can not be compressed. … BUT It can be “optimized” for the web (see more later). …
From my point of view, optimizing user images for the web and telling users how to do so, will be a much better investment. It will need 1 or 2 hours to tell them.
So my question is: Is it worth the effort, or are there “low hanging fruits” somewhere else?
As I wrote above. TW code itself is highly modular. Most of the code is reused. The main difference between a nodejs version and a browser version is “boot”, “startup” and “fake-dom” code. This code is 120k plain text. So may be 30k could be saved, since more than 1/2 is shared with the browser version.
Styles, themes are part of editions already. empty.html doesn’t contain them.
Most users make their wiki big using plugins, they don’t really need or use … Eg. IMO A published read only wiki, doesn’t need codemirror or code highlighting. …
Using optimized JPEGs, PNGs and SVGs will result in much bigger wins.
Squoosh and SVGOMG will need some “digging”, but the results can be impressive in combination with _canonical_uri
SVGs are scaleable, so they are still usable if eg: printed. … JPGs and PNGs for printing need to be different to images optimized for the web.
Extra info, which may be interesting
There is a possibility to externalize the TW core. BUT … but it will add complexity to the maintenence. Since it’s not a “single file wiki” anymore.
On the other hand, if you use GitHub as a platform it can highly improve the “save to the web” speed. Since it only saves the wiki content back to the server.
Assuming no user-plugins are used, since they would go as content by default.
It would be possible to include plugins in the core part, with a custom built wiki.
just some thoughts.