JSON Store -> Database?

Just asking for curiosity rather than any personal need. Now that tiddlers are stored as json how big or small of a step is it to store the json in an external database instead of the html file itself?

What advantages might this have?

I don’t know if performance would be impacted but it seems like the memory footprint of TW could be kept flat even with a very large number of tiddlers.

EDIT: When running on a node server, does TW load all tiddlers from their files, or maybe only the tiddlers that are being used at the moment?

See Lazy Loading on TiddlyWiki.com . You can set node to load “empty” tiddlers, saving load time.

Yes. The default server load all tiddlers into the TW. Except if you use “lazy loading” as Mark pointed out.

To benefit from this your wiki, or the content you externalise needs to meet some logical requirements such as is it needed in only some conditions?, such that it can lay dormant and externalised. If it is key to the operation of the wiki and will always be retrieved, there is less value externalising it.