batching

Doing many similar pieces of work together in one operation, such as loading all needed owners with one query instead of one query each.

In more detail

Batching is the usual cure for an N+1 query. For large exports, batch work also means handing the whole job to a background process and letting the client poll.

Example

In the browser: The course batches DOM reads before writes, inserts many nodes at once with a DocumentFragment, and relies on MutationObserver batching several changes into one callback.

Related terms

Taught in

References