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.