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

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.

Status in Chromium

Blink>Storage>IndexedDB


No active development (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Positive

Owner

Intent to Prototype url

Intent to Prototype thread

Comments

We're not sure if this is actually something we're going to ship. A partner is asking us to put it behind a flag to make it easier to run real-world benchmarks.

Last updated on 2022-04-04