LokiDB
LokiDB copied to clipboard
Async operations?
I'm submitting a...
[X] Feature request [X ] Documentation issue or request
As far as I can see from the code, LokiDb only works in sync methods, in my current work I can see some io blocking (2sec ~) while inserting just 250 entries, this is a bit troubling, as these are not a lot of records and in the future, I will need to insert around 2000.
Is there something I'm missing here? is there a way of making async operations?
Async methods like load/save database are promised. All other methods are sync.
If you need async, you have to make your call to insert async.
- Process one document per async operation instead of all documents at once
- Use a service worker