lambrospetrou / tiddlyflare

Hosting platform for TIddlyWikis.
https://tiddly.lambros.dev
MIT License
4 stars 1 forks source link

Optimizations for 10MB+ wikis #2

Closed lambrospetrou closed 2 days ago

lambrospetrou commented 3 days ago

Things to do:

Other things as followups (create separate issues)

lambrospetrou commented 2 days ago

https://github.com/lambrospetrou/tiddlyflare/commit/a3a9d06b16c411063214948355230c8d4a801092

lambrospetrou commented 2 days ago

In https://github.com/lambrospetrou/tiddlyflare/commit/1f78357c76ee52838b82524675d1ae79ae318f49 there is streaming of the file back to the client by iterating over the SQLite cursor and writing into the ReadableStream returned in the response.

For files with less than 5 chunks, about 10MB, we assemble the whole file in memory and return that in a single chunk and also keep it in memory for faster serving of the next request.

lambrospetrou commented 2 days ago

We have streaming now in both sides, reading and writing the wiki files.

GZIP will remain for later as further optimization. Will track separately.