Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1219)

Issue 1417323006: OOPIFs: Deduplicating MHTML parts across frames. (Closed)

Created:
5 years, 1 month ago by Łukasz Anforowicz
Modified:
4 years, 11 months ago
CC:
asanka, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mhtml-serialization-per-frame
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

OOPIFs: Deduplicating MHTML parts across frames. Previous CL (crrev.com/1386873003) made MHTML serialization work in presence of out-of-process iframes, but can potentially include the same MHTML part twice. MHTML with duplicated parts can be rendered by Chrome and Internet Explorer without problems (at least according to the limited ad-hoc testing I've done), but the unnecessary increase of the file size is a performance regression. After the current CL, the browser keeps track of already serialized MHTML parts and communicates them to the renderer/serializer for each frame (so they can be deduped). This fixes the issue pointed out above. BUG=538766 Committed: https://crrev.com/ede9cc06d2550f0ee0dce0285cc88c872809c1bb Cr-Commit-Position: refs/heads/master@{#367206}

Patch Set 1 #

Patch Set 2 : Added salt to the digest calculations. #

Patch Set 3 : Rebasing... #

Patch Set 4 : Rebasing... #

Total comments: 6

Patch Set 5 : Addressed CR feedback from Nick. #

Patch Set 6 : Rebasing... #

Patch Set 7 : Rebasing... #

Total comments: 16

Patch Set 8 : Rebasing... #

Patch Set 9 : Addressed the easy part of dcheng@'s CR feedback. #

Patch Set 10 : Introduced MHTMLPartsGenerationDelegate interface. #

Total comments: 12

Patch Set 11 : Addressed more CR feedback from dcheng@. #

Patch Set 12 : Rebasing... #

Total comments: 4

Patch Set 13 : Passing MHTMLPartsGenerationDelegate by pointer. #

Total comments: 4

Patch Set 14 : Addressed CR feedback from rdsmith@. #

Total comments: 7

Patch Set 15 : Addressed CR feedback from nasko@. #

Total comments: 1

Patch Set 16 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -157 lines) Patch
M chrome/browser/download/save_page_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -4 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +9 lines, -2 lines 0 comments Download
M content/browser/download/mhtml_generation_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 10 chunks +81 lines, -17 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +47 lines, -25 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +3 lines, -7 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +65 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageSerializer.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +20 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/page/PageSerializer.cpp View 1 2 3 4 5 6 7 8 9 10 11 11 chunks +11 lines, -21 lines 0 comments Download
M third_party/WebKit/Source/web/WebPageSerializer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +22 lines, -33 lines 0 comments Download
M third_party/WebKit/Source/web/tests/PageSerializerTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -7 lines 0 comments Download
M third_party/WebKit/public/web/WebPageSerializer.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +17 lines, -9 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Łukasz Anforowicz
nick@, could you please take a look?
5 years ago (2015-12-02 23:33:55 UTC) #2
ncarter (slow)
lgtm https://codereview.chromium.org/1417323006/diff/60001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/60001/content/browser/download/mhtml_generation_manager.cc#newcode175 content/browser/download/mhtml_generation_manager.cc:175: std::set<std::string> digests_of_uris_to_skip; This is unused. https://codereview.chromium.org/1417323006/diff/60001/content/browser/download/mhtml_generation_manager.h File content/browser/download/mhtml_generation_manager.h ...
5 years ago (2015-12-04 21:52:40 UTC) #3
Łukasz Anforowicz
Thanks for reviewing. dcheng@, could you please take a look? https://codereview.chromium.org/1417323006/diff/60001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/60001/content/browser/download/mhtml_generation_manager.cc#newcode175 ...
5 years ago (2015-12-04 22:55:43 UTC) #5
dcheng
https://codereview.chromium.org/1417323006/diff/120001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/120001/content/browser/download/mhtml_generation_manager.cc#newcode174 content/browser/download/mhtml_generation_manager.cc:174: std::string digest = crypto::SHA256HashString(ipc_params.salt + uri.spec()); Maybe already_serialized_uris should ...
5 years ago (2015-12-11 07:36:06 UTC) #6
Łukasz Anforowicz
On 2015/12/11 07:36:06, dcheng wrote: > https://codereview.chromium.org/1417323006/diff/120001/content/browser/download/mhtml_generation_manager.cc > File content/browser/download/mhtml_generation_manager.cc (right): > > https://codereview.chromium.org/1417323006/diff/120001/content/browser/download/mhtml_generation_manager.cc#newcode174 > ...
5 years ago (2015-12-14 19:34:32 UTC) #7
Łukasz Anforowicz
dcheng@, thanks for reviewing. I've addressed a subset of your feedback, but still need to ...
5 years ago (2015-12-14 19:39:02 UTC) #8
Łukasz Anforowicz
Some more ideas about enumeration and handling of resources to be skipped by serialization... https://codereview.chromium.org/1417323006/diff/120001/content/renderer/render_frame_impl.cc ...
5 years ago (2015-12-18 17:38:49 UTC) #9
dcheng
On 2015/12/18 at 17:38:49, lukasza wrote: > Some more ideas about enumeration and handling of ...
5 years ago (2015-12-18 17:46:05 UTC) #10
Łukasz Anforowicz
On 2015/12/18 17:46:05, dcheng wrote: > On 2015/12/18 at 17:38:49, lukasza wrote: > > Some ...
5 years ago (2015-12-18 18:08:46 UTC) #11
Łukasz Anforowicz
Daniel, could you please take another look? In the latest patchset (#10) I have introduced ...
5 years ago (2015-12-18 23:05:08 UTC) #12
dcheng
https://codereview.chromium.org/1417323006/diff/180001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1417323006/diff/180001/content/renderer/render_frame_impl.cc#newcode604 content/renderer/render_frame_impl.cc:604: if (0 != params_.digests_of_uris_to_skip.count(digest)) ContainsKey? Or find()? Either seems ...
5 years ago (2015-12-22 01:01:46 UTC) #13
Łukasz Anforowicz
Daniel, can you take another look please? https://codereview.chromium.org/1417323006/diff/180001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1417323006/diff/180001/content/renderer/render_frame_impl.cc#newcode604 content/renderer/render_frame_impl.cc:604: if (0 ...
5 years ago (2015-12-22 21:06:47 UTC) #14
dcheng
lgtm https://codereview.chromium.org/1417323006/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1417323006/diff/220001/content/renderer/render_frame_impl.cc#newcode610 content/renderer/render_frame_impl.cc:610: return false; An alternative is return !digests_of_uris_of_serialized_resources_->insert(digest)->second; Which ...
4 years, 11 months ago (2015-12-29 18:37:27 UTC) #15
Łukasz Anforowicz
Thanks for reviewing. rdsmith@, could you please take a look? https://codereview.chromium.org/1417323006/diff/220001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/1417323006/diff/220001/content/renderer/render_frame_impl.cc#newcode610 ...
4 years, 11 months ago (2015-12-29 19:32:57 UTC) #17
Randy Smith (Not in Mondays)
content/browser/download LGTM; below are suggestions for you to do with as you wish. https://codereview.chromium.org/1417323006/diff/240001/content/browser/download/mhtml_generation_manager.cc File ...
4 years, 11 months ago (2015-12-30 00:45:49 UTC) #20
Łukasz Anforowicz
Thanks for reviewing. https://codereview.chromium.org/1417323006/diff/240001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/240001/content/browser/download/mhtml_generation_manager.cc#newcode316 content/browser/download/mhtml_generation_manager.cc:316: } On 2015/12/30 00:45:49, Randy Smith ...
4 years, 11 months ago (2015-12-30 19:09:09 UTC) #21
nasko
Just a couple of drive-by nits. https://codereview.chromium.org/1417323006/diff/260001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/260001/content/browser/download/mhtml_generation_manager.cc#newcode58 content/browser/download/mhtml_generation_manager.cc:58: bool done = ...
4 years, 11 months ago (2015-12-30 19:22:26 UTC) #23
Łukasz Anforowicz
Thanks for reviewing. https://codereview.chromium.org/1417323006/diff/260001/content/browser/download/mhtml_generation_manager.cc File content/browser/download/mhtml_generation_manager.cc (right): https://codereview.chromium.org/1417323006/diff/260001/content/browser/download/mhtml_generation_manager.cc#newcode58 content/browser/download/mhtml_generation_manager.cc:58: bool done = !waiting_for_response_from_renderer && no_more_requests_to_send; ...
4 years, 11 months ago (2015-12-30 19:47:10 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417323006/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417323006/280001
4 years, 11 months ago (2015-12-30 19:47:55 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/111933) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 11 months ago (2015-12-30 19:50:21 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417323006/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417323006/300001
4 years, 11 months ago (2015-12-30 20:17:20 UTC) #32
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 11 months ago (2015-12-30 23:48:39 UTC) #33
commit-bot: I haz the power
4 years, 11 months ago (2015-12-30 23:49:53 UTC) #35
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/ede9cc06d2550f0ee0dce0285cc88c872809c1bb
Cr-Commit-Position: refs/heads/master@{#367206}

Powered by Google App Engine
This is Rietveld 408576698