MHTML Generation: discard serialized resources by the measure they are encoded |
||
Issue descriptionTo 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"
,
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
,
Jan 5 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by carlosk@chromium.org
, Dec 30 2016