Currently cache.put() and cache.add() do something like:
1. Accumulate the entire response body in memory in the renderer.
2. Send the put operation to the browser process.
3. Schedule the put operation in the scheduler queue.
4. Write the entire body to disk before allowing the next operation to proceed.
This is sub-optimal for a couple of reasons:
a. It can use a lot of memory to buffer the response in the renderer.
b. Writing the buffer to disk within a scheduled operation can block cache.match() and other calls on large amounts of disk I/O.
c. Bodies can only be written to disk serially which may not maximize disk bandwidth.
This is related to bug 451174 and makes that problem worse. We could fix this issue, though, without making operations parallel. We would just need a way to store the body on disk outside an operation and then the put operation would mark it as committed.
I'm planning to work this as part of the backend redesign.
Comment 1 by wanderview@chromium.org
, Aug 31