Closed jacoscaz closed 3 years ago
Indeed, this does seem to be the case. Browser-side usage via level-js
may result in significantly worse performance levels, up to one order go magnitude. This is extremely annoying but there's nothing we can do except writing an entirely new AbstractLevelDOWN
implementation that somehow manages to go around IndexedDB
's issues. Perhaps it could use a combination of snapshots + AOF like Redis does. Closing for now, will reopen if anyone is interested and willing to help.
Conversation in #119 revealed significant gaps in performance when deployed browser-side using
IndexedDB
via thelevel-js
backend.These gaps seem to be mostly due to an objective difference in performance between
LevelDB
andIndexedDB
(https://stackoverflow.com/a/22315353), even though the latter was originally modeled on the former. Should this turn out to be the case, there's little we could do that wouldn't involve crafting a completely different backend.That said, we don't have a simple and automated way to measure these gaps as our performance tests have to be launched manually and only run in Node.js. Automating them and running them client-side would be a good idea.