New issue
Advanced search Search tips

Issue 755451 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Avoid copying in AsyncFileUtil::ReadDirectoryCallback

Project Member Reported by nya@chromium.org, Aug 15 2017

Issue description

AsyncFileUtil::ReadDirectoryCallback takes a const reference of EntryList, which makes it impossible to use moves. EntryList can be often large, so we want to change the definition to avoid unnecessary copies.
https://cs.chromium.org/chromium/src/storage/browser/fileapi/async_file_util.h?rcl=2bf070ee435877d5646c2bcecba160c9d72db6d4&l=73

 

Comment 1 by nya@chromium.org, Aug 25 2017

Owner: tzik@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 28 2017

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

commit a40b4405086750a1911b653f8d5cba5d625bcaf9
Author: tzik <tzik@chromium.org>
Date: Mon Aug 28 14:46:12 2017

Pass FileSystem's ReadDirectory result by value

The result of ReadDirectory may be large, and, as it's passed by const-ref
in the current implementation, the callee has to copy it to use it later.

This CL changes the signature of the result handler to pass the result by
value, so that the result handler may move it without copying it.

Bug: 755451
Change-Id: I10050853106ac7324a7c46fbaeb0fadbd0e15f77
Reviewed-on: https://chromium-review.googlesource.com/628001
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: Tomasz Mikolajewski <mtomasz@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497758}
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/drive/fileapi/fileapi_worker.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/file_system_provider/fileapi/provider_async_file_util_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/file_system_provider/operations/read_directory_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/fileapi/recent_download_source.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/chromeos/fileapi/recent_download_source.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/extensions/api/developer_private/developer_private_api.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/extensions/api/developer_private/developer_private_api.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/device_media_async_file_util.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/itunes_file_util_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/mtp_device_async_delegate.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/fileapi/picasa_file_util_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/content/browser/fileapi/fileapi_message_filter.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/content/browser/fileapi/fileapi_message_filter.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/content/browser/plugin_private_storage_helper.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/content/browser/renderer_host/pepper/pepper_internal_file_ref_backend.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/async_file_util.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_dir_url_request_job.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_dir_url_request_job.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_operation.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_operation_impl_unittest.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_operation_runner.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/file_system_operation_runner.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/recursive_operation_delegate.cc
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/fileapi/recursive_operation_delegate.h
[modify] https://crrev.com/a40b4405086750a1911b653f8d5cba5d625bcaf9/storage/browser/test/async_file_test_helper.cc

Sign in to add a comment