as an example, let’s consider how litewrite wants to pass data to the documents module and thus to the baseClient on each keystroke.
the current situation (0.10) is that each change triggers an IndexedDB write, but the corresponding http PUT is only initiated if none is currently running. this is acceptable if you average < 5 keystrokes per second (an IndexedDB commit takes about 200ms).
but storing keystrokes is not the only example - yesterday i tried to write a script that exports all tosdr mailing list posts out of my mailbox (about 1000 out of 20,000 email messages), and ran into a situation where there were 2000 IndexedDB gets running, and 400 IndexedDB puts, and because of these long queues, requests were taking up to 5 minutes to complete.
it is not the IndexedDB access by itself that is slow, only write commits are slow. so we need a way to group IndexedDB writes into batches.