dumbmatter / fakeIndexedDB

A pure JS in-memory implementation of the IndexedDB API
Apache License 2.0
562 stars 69 forks source link

Can I use this for a in memory only data view as a prod drop-in replacement? #103

Closed brunovinicius closed 1 month ago

brunovinicius commented 1 month ago

I found this lib recently and I wonder if it would be stable enough to use it as a readonly source on a app where I have a requirement of loading a large chunk of data and display in a "View Mode" for the app. Would you think this is a viable use for the lib?

dumbmatter commented 1 month ago

You can try. I was thinking along the same lines when I initially made this, but never ended up using it that way. Instead in my app I wound up using a custom built cache, which I think was easier because I could give it exactly the features I needed, and with a less annoying API.

Also be aware that the implementations of many of the database operations in fake-indexeddb are pretty slow, so it might not actually be faster than native IndexedDB even though it doesn't write to disk.

brunovinicius commented 1 month ago

Hey thanks for the prompt feedback. In my case I got to implement a somewhat big processing just to consolidate the data but the data that will be stored is very small. Guess ill take a shot and see how it goes. Thanks again for the prompt response.