New issue
Advanced search Search tips

Issue 658556 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 651525



Sign in to add a comment

MHTML Generation: discard serialized resources by the measure they are encoded

Project Member Reported by carlosk@chromium.org, Oct 22 2016

Issue description

To lessen the memory impact of MHTML generation on the renderer process we should change the code in WebFrameSerializer::generateMHTMLParts [1] so to free serialized resources after they have been encoded and copied. This should decrease the peak of memory usage occurring at this point to approximately half.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/web/WebFrameSerializer.cpp?q="WebFrameSerializer::generateMHTMLParts"
 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65ad0174d081840215c19f69ab819f19fbc667b9

commit 65ad0174d081840215c19f69ab819f19fbc667b9
Author: carlosk <carlosk@chromium.org>
Date: Thu Jan 05 03:35:07 2017

MHTML generation: discard serialized resources by the measure they are encoded.

This change update MHTML generation code to avoid having both serialized and
encoded copies of resources in memory. As pages being saved to MHTML can get to
many MB in size this change avoids a peak in memory usage where both serialized
and encoded versions of the same resource existed.

This specific optimization is local to WebFrameSerializer but as it required
replacing a wtf::Vector with a wtf::Deque as the container of resources that
caused the need to update a few other files.

BUG= 658556 

Review-Url: https://codereview.chromium.org/2605413002
Cr-Commit-Position: refs/heads/master@{#441567}

[modify] https://crrev.com/65ad0174d081840215c19f69ab819f19fbc667b9/third_party/WebKit/Source/core/frame/FrameSerializer.cpp
[modify] https://crrev.com/65ad0174d081840215c19f69ab819f19fbc667b9/third_party/WebKit/Source/core/frame/FrameSerializer.h
[modify] https://crrev.com/65ad0174d081840215c19f69ab819f19fbc667b9/third_party/WebKit/Source/web/WebFrameSerializer.cpp
[modify] https://crrev.com/65ad0174d081840215c19f69ab819f19fbc667b9/third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp

Status: Fixed (was: Started)

Sign in to add a comment