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

Issue 470323003: [fsp] Improve performance for reading small chunks of data. (Closed)

Created:
6 years, 4 months ago by mtomasz
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, davemoore+watch_chromium.org, Greg Billock, jam, kinuko+fileapi, nhiroki, nkostylev+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, tfarina, Lei Zhang, tommycli, tzik, vandebo (ex-Chrome)
Project:
chromium
Visibility:
Public.

Description

[fsp] Improve performance for reading small chunks of data. This patch adds a field to the BufferedFileStreamReader constructor, which says how much bytes in total are going to be requested. This information is used for an efficient buffering strategy. TEST=unit_tests: *BufferingFileStreamReader* BUG=398338 Committed: https://crrev.com/85aa9d79cb455b47fc383ce5a64bb7da3800ba11 Cr-Commit-Position: refs/heads/master@{#295177}

Patch Set 1 #

Patch Set 2 : Fixed a dcheck. #

Total comments: 8

Patch Set 3 : Fixed. #

Total comments: 2

Patch Set 4 : Fixed. #

Patch Set 5 : Rebased. #

Patch Set 6 : Added a constant + a checked_cast. #

Patch Set 7 : (1) length -> limit, (2) -1 -> max_int64 #

Patch Set 8 : Cleaned up. #

Total comments: 6

Patch Set 9 : Fixed. #

Total comments: 6

Patch Set 10 : Fixed. #

Patch Set 11 : Crazy rebase. #

Patch Set 12 : Fixed. #

Patch Set 13 : Rebased. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -66 lines) Patch
M chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/drive/fileapi/file_system_backend_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fileapi/backend_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +49 lines, -18 lines 0 comments Download
M chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_stream_reader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 15 chunks +78 lines, -15 lines 0 comments Download
M chrome/browser/chromeos/fileapi/file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/fileapi/file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/fileapi/file_system_backend_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/fileapi/mtp_file_system_backend_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/media_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/media_galleries/fileapi/media_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync_file_system/local/sync_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync_file_system/local/sync_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/fileapi/upload_file_system_file_element_reader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -5 lines 0 comments Download
M content/public/test/test_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/test_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/blob/blob_url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +18 lines, -11 lines 2 comments Download
M storage/browser/fileapi/copy_or_move_operation_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M storage/browser/fileapi/file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +9 lines, -3 lines 0 comments Download
M storage/browser/fileapi/file_system_context.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M storage/browser/fileapi/file_system_context.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M storage/browser/fileapi/file_system_url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -3 lines 0 comments Download
M storage/browser/fileapi/isolated_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/fileapi/isolated_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/fileapi/plugin_private_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/fileapi/plugin_private_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/fileapi/sandbox_file_system_backend.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M storage/browser/fileapi/sandbox_file_system_backend.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 55 (13 generated)
mtomasz
@hashimoto: PTAL. This is the approach we're discussing some time ago.
6 years, 4 months ago (2014-08-22 05:01:28 UTC) #1
hashimoto
Seems to be the right direction, but please get reviewed first by File API owners. ...
6 years, 4 months ago (2014-08-22 06:53:42 UTC) #2
mtomasz
https://codereview.chromium.org/470323003/diff/20001/webkit/browser/blob/blob_url_request_job.cc File webkit/browser/blob/blob_url_request_job.cc (right): https://codereview.chromium.org/470323003/diff/20001/webkit/browser/blob/blob_url_request_job.cc#newcode580 webkit/browser/blob/blob_url_request_job.cc:580: item.length() - additional_offset, On 2014/08/22 06:53:42, hashimoto wrote: > ...
6 years, 4 months ago (2014-08-25 03:32:31 UTC) #3
mtomasz
PTAL. @hashimoto: chrome/browser/chromeos/file_system_provider/* chrome/browser/chromeos/drive/fileapi/* @tzik: chrome/browser/media_galleries/fileapi/* chrome/browser/sync_file_system/local/* content/browser/fileapi/upload_file_system_file_element_reader.cc webkit/browser/fileapi/* @noamsml: chrome/browser/local_discovery/storage/* @kinaba: chrome/browser/chromeos/fileapi/* @darin: content/public/test/test_file_system_backend.* ...
6 years, 4 months ago (2014-08-25 03:44:49 UTC) #4
tzik
lgtm
6 years, 4 months ago (2014-08-25 08:00:41 UTC) #5
kinaba
lgtm https://codereview.chromium.org/470323003/diff/40001/webkit/browser/fileapi/file_system_backend.h File webkit/browser/fileapi/file_system_backend.h (right): https://codereview.chromium.org/470323003/diff/40001/webkit/browser/fileapi/file_system_backend.h#newcode105 webkit/browser/fileapi/file_system_backend.h:105: // ERR_UPLOAD_FILE_CHANGED error. Could you also add a ...
6 years, 4 months ago (2014-08-25 08:07:54 UTC) #6
mtomasz
https://codereview.chromium.org/470323003/diff/40001/webkit/browser/fileapi/file_system_backend.h File webkit/browser/fileapi/file_system_backend.h (right): https://codereview.chromium.org/470323003/diff/40001/webkit/browser/fileapi/file_system_backend.h#newcode105 webkit/browser/fileapi/file_system_backend.h:105: // ERR_UPLOAD_FILE_CHANGED error. On 2014/08/25 08:07:54, kinaba wrote: > ...
6 years, 4 months ago (2014-08-25 08:30:13 UTC) #7
mtomasz
The CQ bit was checked by mtomasz@chromium.org
6 years, 4 months ago (2014-08-25 08:40:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/470323003/60001
6 years, 4 months ago (2014-08-25 08:40:34 UTC) #9
mtomasz
The CQ bit was unchecked by mtomasz@chromium.org
6 years, 4 months ago (2014-08-25 08:55:10 UTC) #10
Noam Samuel
On 2014/08/25 08:55:10, mtomasz wrote: > The CQ bit was unchecked by mailto:mtomasz@chromium.org local_discovery lgtm
6 years, 4 months ago (2014-08-25 18:03:36 UTC) #11
mtomasz
On 2014/08/25 18:03:36, Noam Samuel wrote: > On 2014/08/25 08:55:10, mtomasz wrote: > > The ...
6 years, 3 months ago (2014-09-01 00:15:34 UTC) #12
hashimoto
https://codereview.chromium.org/470323003/diff/20001/webkit/browser/blob/blob_url_request_job.cc File webkit/browser/blob/blob_url_request_job.cc (right): https://codereview.chromium.org/470323003/diff/20001/webkit/browser/blob/blob_url_request_job.cc#newcode580 webkit/browser/blob/blob_url_request_job.cc:580: item.length() - additional_offset, On 2014/08/25 03:32:31, mtomasz wrote: > ...
6 years, 3 months ago (2014-09-01 11:01:01 UTC) #13
mtomasz
> > This is a good point. However, int64 are used all over fileapi code, ...
6 years, 3 months ago (2014-09-02 05:13:27 UTC) #14
hashimoto
On 2014/09/02 05:13:27, mtomasz wrote: > > > This is a good point. However, int64 ...
6 years, 3 months ago (2014-09-03 11:15:54 UTC) #15
mtomasz
On 2014/09/03 11:15:54, hashimoto wrote: > On 2014/09/02 05:13:27, mtomasz wrote: > > > > ...
6 years, 3 months ago (2014-09-03 14:40:37 UTC) #16
mtomasz
On 2014/09/03 14:40:37, mtomasz wrote: > On 2014/09/03 11:15:54, hashimoto wrote: > > On 2014/09/02 ...
6 years, 3 months ago (2014-09-04 04:07:28 UTC) #17
mtomasz
@hashimoto: Replaced length -> limit and -1 to max. PTAL.
6 years, 3 months ago (2014-09-04 05:41:00 UTC) #18
hashimoto
lgtm Some parts are still using the word |length|. Please check and fix all files ...
6 years, 3 months ago (2014-09-04 11:21:25 UTC) #19
mtomasz
https://codereview.chromium.org/470323003/diff/140001/content/browser/fileapi/upload_file_system_file_element_reader.cc File content/browser/fileapi/upload_file_system_file_element_reader.cc (right): https://codereview.chromium.org/470323003/diff/140001/content/browser/fileapi/upload_file_system_file_element_reader.cc#newcode47 content/browser/fileapi/upload_file_system_file_element_reader.cc:47: range_length_, On 2014/09/04 11:21:25, hashimoto wrote: > Please add ...
6 years, 3 months ago (2014-09-05 01:04:40 UTC) #20
hashimoto
Please fix the failing UploadFileSystemFileElementReaderTest. https://codereview.chromium.org/470323003/diff/160001/webkit/browser/blob/blob_url_request_job.cc File webkit/browser/blob/blob_url_request_job.cc (right): https://codereview.chromium.org/470323003/diff/160001/webkit/browser/blob/blob_url_request_job.cc#newcode10 webkit/browser/blob/blob_url_request_job.cc:10: #include <vector> nit: Are ...
6 years, 3 months ago (2014-09-05 03:17:28 UTC) #21
mtomasz
Done. I added two fixes, which basically convert max_uint64 to max_int64. This is not nice, ...
6 years, 3 months ago (2014-09-05 05:31:42 UTC) #22
hashimoto
Sorry for being late to respond. lgtm
6 years, 3 months ago (2014-09-09 04:51:31 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/470323003/180001
6 years, 3 months ago (2014-09-09 05:00:01 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/53226) android_arm64_dbg_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_arm64_dbg_recipe/builds/3192) android_chromium_gn_compile_rel ...
6 years, 3 months ago (2014-09-09 05:07:48 UTC) #27
mtomasz
@jochen: PTAL at: content/public/test/test_file_system_backend.* webkit/browser/blob/blob_url_request_job.cc Thanks.
6 years, 3 months ago (2014-09-09 06:53:48 UTC) #29
jochen (gone - plz use gerrit)
my bits lgtm
6 years, 3 months ago (2014-09-10 08:11:27 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/470323003/200001
6 years, 3 months ago (2014-09-10 08:12:33 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/64921) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/53931) chromium_presubmit ...
6 years, 3 months ago (2014-09-10 08:18:10 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mtomasz@chromium.org/470323003/220001
6 years, 3 months ago (2014-09-10 09:47:55 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: android_aosp on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_aosp/builds/13894) chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/9942)
6 years, 3 months ago (2014-09-10 09:57:39 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/470323003/220001
6 years, 3 months ago (2014-09-11 03:25:42 UTC) #40
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/10208)
6 years, 3 months ago (2014-09-11 03:47:56 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/470323003/240001
6 years, 3 months ago (2014-09-11 05:12:01 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/10223)
6 years, 3 months ago (2014-09-11 05:22:50 UTC) #46
mtomasz
On 2014/09/11 05:22:50, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 3 months ago (2014-09-11 07:33:35 UTC) #48
jianli
https://codereview.chromium.org/470323003/diff/240001/storage/browser/blob/blob_url_request_job.cc File storage/browser/blob/blob_url_request_job.cc (right): https://codereview.chromium.org/470323003/diff/240001/storage/browser/blob/blob_url_request_job.cc#newcode586 storage/browser/blob/blob_url_request_job.cc:586: : item.length() - additional_offset, Should this be item.length() - ...
6 years, 3 months ago (2014-09-11 17:45:51 UTC) #49
mtomasz
https://codereview.chromium.org/470323003/diff/240001/storage/browser/blob/blob_url_request_job.cc File storage/browser/blob/blob_url_request_job.cc (right): https://codereview.chromium.org/470323003/diff/240001/storage/browser/blob/blob_url_request_job.cc#newcode586 storage/browser/blob/blob_url_request_job.cc:586: : item.length() - additional_offset, On 2014/09/11 17:45:51, jianli wrote: ...
6 years, 3 months ago (2014-09-16 08:58:22 UTC) #50
jianli
blob_url_request_job.cc lgtm
6 years, 3 months ago (2014-09-16 17:46:09 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/470323003/240001
6 years, 3 months ago (2014-09-16 23:07:20 UTC) #53
commit-bot: I haz the power
Committed patchset #13 (id:240001) as b40d820bae76b5be054718551e23cae81752f5e2
6 years, 3 months ago (2014-09-16 23:40:46 UTC) #54
commit-bot: I haz the power
6 years, 3 months ago (2014-09-16 23:41:25 UTC) #55
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/85aa9d79cb455b47fc383ce5a64bb7da3800ba11
Cr-Commit-Position: refs/heads/master@{#295177}

Powered by Google App Engine
This is Rietveld 408576698