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

Issue 7974011: Break large blobs into multiple ipcs during creation. (Closed)

Created:
9 years, 3 months ago by michaeln
Modified:
9 years, 2 months ago
Reviewers:
jam, jianli
CC:
chromium-reviews, joi+watch-content_chromium.org, dpranke+watch-content_chromium.org, darin-cc_chromium.org, pam+watch_chromium.org
Visibility:
Public.

Description

A few improvements to Blob handling. * Break large blobs into multiple ipcs during creation. * Use shared memory blocks for the xfer. * Rename some methods and IPCs for readability. * Cap memory usage in the browser process at 1G. BUG=97221 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=105950

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Total comments: 1

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 27

Patch Set 10 : '' #

Patch Set 11 : '' #

Total comments: 2

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 12

Patch Set 16 : '' #

Total comments: 1

Patch Set 17 : '' #

Total comments: 4

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Total comments: 4

Patch Set 22 : '' #

Patch Set 23 : '' #

Total comments: 3

Patch Set 24 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -444 lines) Patch
M content/browser/renderer_host/blob_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +10 lines, -10 lines 0 comments Download
M content/browser/renderer_host/blob_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +51 lines, -27 lines 0 comments Download
M content/common/webblob_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +36 lines, -8 lines 0 comments Download
M content/common/webblobregistry_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +9 lines, -5 lines 0 comments Download
M content/common/webblobregistry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +66 lines, -7 lines 0 comments Download
M content/common/webkit_param_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -8 lines 0 comments Download
M content/common/webkit_param_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +0 lines, -100 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +3 lines, -3 lines 0 comments Download
M webkit/blob/blob_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +56 lines, -63 lines 0 comments Download
M webkit/blob/blob_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +4 lines, -3 lines 0 comments Download
M webkit/blob/blob_storage_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +29 lines, -6 lines 0 comments Download
M webkit/blob/blob_storage_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +131 lines, -60 lines 0 comments Download
M webkit/blob/blob_storage_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 8 chunks +29 lines, -32 lines 0 comments Download
M webkit/blob/blob_url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 7 chunks +11 lines, -11 lines 0 comments Download
M webkit/blob/blob_url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +2 lines, -13 lines 0 comments Download
M webkit/blob/view_blob_internals_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +12 lines, -11 lines 0 comments Download
M webkit/fileapi/file_system_operation_write_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +17 lines, -15 lines 0 comments Download
M webkit/tools/test_shell/test_shell_webblobregistry_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +6 lines, -7 lines 0 comments Download
M webkit/tools/test_shell/test_shell_webblobregistry_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +21 lines, -55 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
michaeln
still have to look at the blob_storage_controller_unittest
9 years, 3 months ago (2011-09-22 20:40:10 UTC) #1
michaeln
fixed up the unittests
9 years, 3 months ago (2011-09-22 21:53:15 UTC) #2
michaeln
http://codereview.chromium.org/7974011/diff/5019/webkit/blob/blob_storage_controller.cc File webkit/blob/blob_storage_controller.cc (right): http://codereview.chromium.org/7974011/diff/5019/webkit/blob/blob_storage_controller.cc#newcode68 webkit/blob/blob_storage_controller.cc:68: target_blob_data->AppendData(item.data()); Since there's no spilling over to disk if ...
9 years, 3 months ago (2011-09-22 22:59:25 UTC) #3
michaeln
> Since there's no spilling over to disk if things get very large yet we ...
9 years, 3 months ago (2011-09-23 21:41:33 UTC) #4
jianli
http://codereview.chromium.org/7974011/diff/15001/content/browser/renderer_host/blob_message_filter.h File content/browser/renderer_host/blob_message_filter.h (right): http://codereview.chromium.org/7974011/diff/15001/content/browser/renderer_host/blob_message_filter.h#newcode31 content/browser/renderer_host/blob_message_filter.h:31: void OnRegisterUnfinalizedBlobUrl(const GURL& url); It would be more intuitive ...
9 years, 3 months ago (2011-09-23 23:00:42 UTC) #5
michaeln
no snapshot yet, i have to look at memory_usage_ getting out of sync when clones ...
9 years, 3 months ago (2011-09-24 01:15:24 UTC) #6
michaeln
here's a new snapshot
9 years, 3 months ago (2011-09-24 02:30:56 UTC) #7
jianli
By the way, have you run the blob related webkit layout tests to verify? http://codereview.chromium.org/7974011/diff/15001/content/browser/renderer_host/blob_message_filter.h ...
9 years, 2 months ago (2011-09-27 01:12:18 UTC) #8
michaeln
http://codereview.chromium.org/7974011/diff/15001/content/browser/renderer_host/blob_message_filter.h File content/browser/renderer_host/blob_message_filter.h (right): http://codereview.chromium.org/7974011/diff/15001/content/browser/renderer_host/blob_message_filter.h#newcode31 content/browser/renderer_host/blob_message_filter.h:31: void OnRegisterUnfinalizedBlobUrl(const GURL& url); On 2011/09/27 01:12:18, jianli wrote: ...
9 years, 2 months ago (2011-09-27 23:27:31 UTC) #9
michaeln
> By the way, have you run the blob related webkit layout tests to verify? ...
9 years, 2 months ago (2011-09-28 00:39:45 UTC) #10
michaeln
On 2011/09/28 00:39:45, michaeln wrote: > > By the way, have you run the blob ...
9 years, 2 months ago (2011-09-28 00:45:24 UTC) #11
jianli
Looks quite good. Some more issues, but nothing big. http://codereview.chromium.org/7974011/diff/34001/content/browser/renderer_host/blob_message_filter.cc File content/browser/renderer_host/blob_message_filter.cc (right): http://codereview.chromium.org/7974011/diff/34001/content/browser/renderer_host/blob_message_filter.cc#newcode53 content/browser/renderer_host/blob_message_filter.cc:53: ...
9 years, 2 months ago (2011-09-29 01:13:33 UTC) #12
michaeln
http://codereview.chromium.org/7974011/diff/34001/content/browser/renderer_host/blob_message_filter.cc File content/browser/renderer_host/blob_message_filter.cc (right): http://codereview.chromium.org/7974011/diff/34001/content/browser/renderer_host/blob_message_filter.cc#newcode53 content/browser/renderer_host/blob_message_filter.cc:53: blob_storage_context_->controller()->RegisterUnfinalizedBlobUrl(url); On 2011/09/29 01:13:33, jianli wrote: > Can we ...
9 years, 2 months ago (2011-09-29 18:59:37 UTC) #13
michaeln
http://codereview.chromium.org/7974011/diff/40001/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc File webkit/tools/test_shell/test_shell_webblobregistry_impl.cc (right): http://codereview.chromium.org/7974011/diff/40001/webkit/tools/test_shell/test_shell_webblobregistry_impl.cc#newcode47 webkit/tools/test_shell/test_shell_webblobregistry_impl.cc:47: g_io_thread->PostTask(FROM_HERE, NewRunnableMethod( also switched to using base::Bind in this ...
9 years, 2 months ago (2011-09-29 19:36:20 UTC) #14
michaeln
http://codereview.chromium.org/7974011/diff/44004/webkit/blob/blob_url_request_job.cc File webkit/blob/blob_url_request_job.cc (right): http://codereview.chromium.org/7974011/diff/44004/webkit/blob/blob_url_request_job.cc#newcode338 webkit/blob/blob_url_request_job.cc:338: // stream_.Seek() blocks the IO thread, see http://crbug.com/75548. might ...
9 years, 2 months ago (2011-09-29 19:45:01 UTC) #15
jianli
LGTM w/ a few nits. http://codereview.chromium.org/7974011/diff/44004/content/common/webkit_param_traits.h File content/common/webkit_param_traits.h (left): http://codereview.chromium.org/7974011/diff/44004/content/common/webkit_param_traits.h#oldcode24 content/common/webkit_param_traits.h:24: #include "webkit/blob/blob_data.h" This include ...
9 years, 2 months ago (2011-09-30 00:59:33 UTC) #16
jam
IPC was never meant to send MBs of data. On some platforms, it's slow to ...
9 years, 2 months ago (2011-09-30 01:14:00 UTC) #17
michaeln
> When we have large data, we use shared memory. Why can't this be done ...
9 years, 2 months ago (2011-09-30 21:56:29 UTC) #18
michaeln
On 2011/09/30 21:56:29, michaeln wrote: > > When we have large data, we use shared ...
9 years, 2 months ago (2011-10-03 20:41:22 UTC) #19
jam
On Mon, Oct 3, 2011 at 1:41 PM, <michaeln@chromium.org> wrote: > On 2011/09/30 21:56:29, michaeln ...
9 years, 2 months ago (2011-10-03 20:42:43 UTC) #20
michaeln
Oh... but not on windows... // Allocate a shared memory buffer to hold the bitmap ...
9 years, 2 months ago (2011-10-03 20:43:19 UTC) #21
jam
On Mon, Oct 3, 2011 at 1:43 PM, <michaeln@chromium.org> wrote: > Oh... but not on ...
9 years, 2 months ago (2011-10-03 22:30:41 UTC) #22
michaeln
> Shared memory... I'll look into doing just that. Ok, additional changes to xfer larger ...
9 years, 2 months ago (2011-10-11 01:08:13 UTC) #23
jam
http://codereview.chromium.org/7974011/diff/59019/content/common/webblob_messages.h File content/common/webblob_messages.h (right): http://codereview.chromium.org/7974011/diff/59019/content/common/webblob_messages.h#newcode40 content/common/webblob_messages.h:40: IPC_SYNC_MESSAGE_CONTROL1_1(BlobHostMsg_SyncAllocateSharedMemory, no need to duplicate this. you can reuse ...
9 years, 2 months ago (2011-10-11 01:56:51 UTC) #24
jam
http://codereview.chromium.org/7974011/diff/59019/content/common/webblob_messages.h File content/common/webblob_messages.h (right): http://codereview.chromium.org/7974011/diff/59019/content/common/webblob_messages.h#newcode40 content/common/webblob_messages.h:40: IPC_SYNC_MESSAGE_CONTROL1_1(BlobHostMsg_SyncAllocateSharedMemory, On 2011/10/11 01:56:51, John Abd-El-Malek wrote: > no ...
9 years, 2 months ago (2011-10-11 02:02:18 UTC) #25
michaeln
> function can move to ChildProcessHost from RenderMessageFilter, and > it can be a ChildHostMsg ...
9 years, 2 months ago (2011-10-11 02:05:26 UTC) #26
michaeln
http://codereview.chromium.org/7974011/diff/59019/content/common/webblobregistry_impl.cc File content/common/webblobregistry_impl.cc (right): http://codereview.chromium.org/7974011/diff/59019/content/common/webblobregistry_impl.cc#newcode45 content/common/webblobregistry_impl.cc:45: const size_t kMaxSharedMemorySize = 10 * 1024 * 1024; ...
9 years, 2 months ago (2011-10-11 02:15:29 UTC) #27
michaeln
> > function can move to ChildProcessHost from RenderMessageFilter, and > > it can be ...
9 years, 2 months ago (2011-10-11 02:41:05 UTC) #28
michaeln
Before i add files and update gypi's and such... wdyt? Here's the code to be ...
9 years, 2 months ago (2011-10-11 02:59:29 UTC) #29
jam
On 2011/10/11 02:15:29, michaeln wrote: > http://codereview.chromium.org/7974011/diff/59019/content/common/webblobregistry_impl.cc > File content/common/webblobregistry_impl.cc (right): > > http://codereview.chromium.org/7974011/diff/59019/content/common/webblobregistry_impl.cc#newcode45 > ...
9 years, 2 months ago (2011-10-11 15:48:52 UTC) #30
jam
On 2011/10/11 02:41:05, michaeln wrote: > > > function can move to ChildProcessHost from RenderMessageFilter, ...
9 years, 2 months ago (2011-10-11 15:50:31 UTC) #31
jam
On 2011/10/11 02:41:05, michaeln wrote: > > > function can move to ChildProcessHost from RenderMessageFilter, ...
9 years, 2 months ago (2011-10-11 16:06:48 UTC) #32
michaeln
> I'm not familiar with the spec. Is there no limit to how big blobs ...
9 years, 2 months ago (2011-10-11 18:29:08 UTC) #33
michaeln
> It's up to you if you want to break it into smaller pieces. Those ...
9 years, 2 months ago (2011-10-12 01:46:35 UTC) #34
michaeln
> This CL is blocked on another to share the shared memory allocation msg > ...
9 years, 2 months ago (2011-10-15 01:17:32 UTC) #35
jam
lgtm with nits (I only concentrated on the IPC parts), thanks for converting this over ...
9 years, 2 months ago (2011-10-15 01:53:15 UTC) #36
jam
On 2011/10/15 01:53:15, John Abd-El-Malek wrote: > http://codereview.chromium.org/7974011/diff/74001/content/common/webblob_messages.h#newcode39 > content/common/webblob_messages.h:39: > IPC_SYNC_MESSAGE_CONTROL3_0(BlobHostMsg_SyncAppendSharedMemory, > nit: we ...
9 years, 2 months ago (2011-10-18 18:26:18 UTC) #37
michaeln
9 years, 2 months ago (2011-10-18 21:15:27 UTC) #38
Since the msg doesn't have a return value, it's not apparent at the callsite
that it blocks, so i thought it was good to keep 'Sync' in the name to make it
clear when looking at a callsite.

> hi, looks like this wasn't done. can you please do it in a followup?

Powered by Google App Engine
This is Rietveld 408576698