4 ms·
Glad you liked it! And thanks for mentioning absurd-sql, I did not know the project. You are absolutely right on memory and crashes. It is a very inefficient w
by ildon 5y ago
Glad you liked it! And thanks for mentioning absurd-sql, I did not know the project.
You are absolutely right on memory and crashes. It is a very inefficient way of storing data in a browser from a memory perspective (and data loss risks). I did mention it in my conclusions :-)
If FileSystemAccessAPIs added block level support and locking for at least certain files that would be a game changer for things like this. In the meanwhile IndexedDB is surely a better option.
- typingmonkey 5y agoI analyzed [1] that problem and tried to reproduce data loss with LokiJS, which also has everything in memory and only partially writes to disc. It is very hard to reproduce a loss. You can call the saveDatabase() when the window 'unload' event fires and also after each write when the database is idle again. This works quite reliable. The only way to lose data is when I shutdown power directly after a write. It is also to mention that having everything in memory will not support multi-tab usage. [1] https://rxdb.info/slow-indexeddb.html https://rxdb.info/slow-indexeddb.html