Intent to Prototype: IndexedDB: batchGetAll()

81 views
Skip to first unread message

Pei Zhang

unread,
Apr 1, 2022, 6:00:35 PM4/1/22
to blin...@chromium.org, Marijn Kruisselbrink, Ayu Ishii, Victor Costan, be...@google.com, Joshua Bell

Contact emails

p...@chromium.org


Explainer

https://github.com/w3c/IndexedDB/issues/376


Specification



Summary

The new IDBObjectStore.batchGetAll() and IDBIndex.batchGetAll() will execute multiple getAll()s in one query to avoid the request overhead of a burst of small queries.



Blink component

Blink>Storage>IndexedDB


Motivation

Currently, IDBObjectStore.getAll() and IDBIndex.getAll() takes an IDBKeyRange and returns an array of IDBValue. If a developer has the need to retrieve from multiple IDBKeyRanges, a burst of getAll() requests need to be issued.


batchGetAll() methods will provide an ergonomic way to request multiple IDBKeyRanges while avoiding request overhead from event loops for bursts of small getAll() queries.


This feature is requested by a partner via https://github.com/w3c/IndexedDB/issues/376.



Initial public proposal

https://github.com/w3c/IndexedDB/issues/376


TAG review



TAG review status

Pending


Risks



Interoperability and Compatibility



Gecko: No signal


WebKit: No signal


Web developers: Positive (https://github.com/w3c/IndexedDB/issues/376). The partner signaled they want to experiment with this prototype after seeing initial microbenchmarks results.


Other signals:


WebView Application Risks

This does not change existing APIs



Debuggability

Not Applicable



Is this feature fully tested by web-platform-tests?

Yes


Flag name

IDBBatchGetAll


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1294977


Launch bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1311837


Estimated milestones

No milestones specified —  We are not sure if we will ship this API. The partner requested us to put the prototype behind a flag so it’s easier for them to run benchmarks.



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5170487008165888


This intent message was generated by Chrome Platform Status.



Reply all
Reply to author
Forward
0 new messages