New issue
Advanced search Search tips

Issue 716623 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 651525



Sign in to add a comment

MHTML generation should send one request per renderer (instead of one per frame)

Project Member Reported by carlosk@chromium.org, Apr 28 2017

Issue description

When creating an MHTML snapshot MHTMLGenerationManager sends one browser->renderer IPC per frame belonging to the page. This is sub-optimal as in most cases a single renderer holds many/all of the page's frames. This is even more the case on Android where generally a single renderer process exists.

We could shorten snapshot time and in sent IPCs by bundling MHTML serialization requests per renderer process instead. We should collect the page's frames -- as already done today -- then bundle them up by renderer process and change requests to send a list of frames to serialize.

To avoid this change increasing the amount of time serialization blocks the renderer main thread, each frame serialization should happen in a different task posted to the main thread. The task processing the last frame then responds to the browser about the work of that renderer being done.

This also allows for an extra optimization: file writing operations that happen on the file thread could be parallelized with the serialization of following frames in their posted tasks. As task queues maintain post ordering the generated file is still guaranteed to be valid.
 
Owner: carlosk@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment