Closed Bug 1388768 Opened 7 years ago Closed 7 years ago

reduce body stream copying in some interception paths

Categories

(Core :: DOM: Service Workers, enhancement, P3)

enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1204254

People

(Reporter: bkelly, Assigned: bkelly)

Details

Currently the nsIInterceptedChannel interface exposes a responseBody writable stream.  When the channel is intercepted the synthesized body must be written to this stream.  We are pretty much always reading from another stream, though, which means we always have a copying step during interception.

Instead of copying to an output stream, we should change nsIInterceptedChannel to consume an nsIInputStream instead.  It may internally copy for some configurations, but for others it can pass the stream on directly.

In particular, we will have to continue to copy for non-e10s because of the way it uses a fake http cache entry.  We must write into the entry.  For e10s, though, we may be able to avoid any copying.
Depends on: 1390638
Priority: -- → P3
I'm going to end up doing this in bug 1204254.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
No longer depends on: 1204254, 1390638
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.