Re: [w3ctag/spec-reviews] Indexed DB getAll(), openKeyCursor() and objectStoreNames (#84)

> Q: Why do we need getAll() versus some iterable type? A: That's what IDBCursor is for, but the performance (as designed) is poor for many scenarios since script must explicitly pull the next result via continue() (vs. a push-type async iterator)

> In parallel, exploring adapting IDB to work with Promises (see https://github.com/inexorabletash/indexeddb-promises) and pursuing Observables for pull-type iteration (i.e. adapting cursors) makes sense as those firm up.

Hmm, this needs serious discussion. As @littledan said upthread, observables are very speculative right now and async iterators are probably a better bet. I also don't understand why you think observables make sense for this use case or are faster: async iterators are strictly more powerful, and if you pull them as fast as possible they should get you results just as fast as a push solution would---with the added benefit that you can control your memory usage and consumption speed, whereas observables are little better than arrays in that they push things to you without any control over the flow rate.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/spec-reviews/issues/84#issuecomment-234099931

Received on Wednesday, 20 July 2016 22:13:48 UTC