Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the advantage of using something like this instead of the IndexedDB Browser Feature




You get all the features of postgres.

run your backend tests against this in memory and tests can be run in parallel instead of using a single real postgres instance

I was shocked to discover how incredibly poorly IndexedDB works. I always thought it would be fast and snappy if a bit alien. But nope, it's incredibly bad!

Despite being a native feature to the browser it's incredibly slow, and the way it works in terms of fetching records based on non-primary keys forces you to either load your entire dataset into RAM at once or iterate though it record-by-record in a slow callback. Something as trivial as 10k records can bring your webapp to a crawl.


I've built some pretty intensive stuff in indexeddb and it was the only thing I've ever done, using native browser features, that I could get to consistently crash the browsers I tested it on (granted, this was many years ago). On top of that, the API is so ugly. I cannot believe indexeddb won over websql (when every browser ever already embeds sqlite). What a shame.

I wonder if those issues are resolved by using the Dexie.js wrapper, because I've had no problems with that.

It does not, I've also used Dexie.js. Your usecase has most likely been too small to run into the very annoying walls.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: