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

Issue 10815008: gdata: Make GDataFileSystem::ReadDirectoryByPath() much more efficient (Closed)

Created:
8 years, 5 months ago by satorux1
Modified:
8 years, 5 months ago
Reviewers:
achuithb
CC:
chromium-reviews, achuith+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

gdata: Make GDataFileSystem::ReadDirectoryByPath() much more efficient Previously, ReadDirectoryByPath() was returning DataDirectoryProto, which contains all child files and directories, recursively. This means, calling ReadDirectoryByPath() on the root directory is super expensive as the returned GDataDirectoryProto contains the entire tree as proto. This was super expensive. With this change, ReadDirectoryByPath() will only return contents of the target directory as a flat vector. BUG=137871 TEST=out/Release/unit_tests --gtest_filter=GData*; also confirmed that the file manager worked as before, including the "save as file" to Drive Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=147806

Patch Set 1 #

Total comments: 1

Patch Set 2 : new version #

Patch Set 3 : should use ToProtoFull instead #

Total comments: 6

Patch Set 4 : address comments #

Patch Set 5 : remove a blank line #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -42 lines) Patch
M chrome/browser/chromeos/gdata/gdata_download_observer.h View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_download_observer.cc View 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system.cc View 1 2 3 2 chunks +18 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_interface.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_proxy.h View 1 2 3 3 chunks +2 lines, -2 lines 2 comments Download
M chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc View 1 2 3 4 2 chunks +10 lines, -11 lines 1 comment Download
M chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc View 1 2 3 7 chunks +19 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
satorux1
8 years, 5 months ago (2012-07-19 15:03:19 UTC) #1
satorux1
please put this on hold. I found a bug... http://codereview.chromium.org/10815008/diff/1/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc File chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc (right): http://codereview.chromium.org/10815008/diff/1/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc#newcode695 chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc:695: ...
8 years, 5 months ago (2012-07-19 15:11:00 UTC) #2
satorux1
Here you go. It's ready!
8 years, 5 months ago (2012-07-21 06:28:31 UTC) #3
achuithb
http://codereview.chromium.org/10815008/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system_interface.h File chrome/browser/chromeos/gdata/gdata_file_system_interface.h (right): http://codereview.chromium.org/10815008/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system_interface.h#newcode65 chrome/browser/chromeos/gdata/gdata_file_system_interface.h:65: // If |error| is not PLATFORM_FILE_OK, |entries| is set ...
8 years, 5 months ago (2012-07-21 21:32:00 UTC) #4
achuithb
Since you're modifying gdata_download_observer, could you manually test uploads to make sure they work with ...
8 years, 5 months ago (2012-07-21 21:32:31 UTC) #5
satorux1
http://codereview.chromium.org/10815008/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system_interface.h File chrome/browser/chromeos/gdata/gdata_file_system_interface.h (right): http://codereview.chromium.org/10815008/diff/3002/chrome/browser/chromeos/gdata/gdata_file_system_interface.h#newcode65 chrome/browser/chromeos/gdata/gdata_file_system_interface.h:65: // If |error| is not PLATFORM_FILE_OK, |entries| is set ...
8 years, 5 months ago (2012-07-21 21:54:08 UTC) #6
satorux1
On 2012/07/21 21:32:31, achuith.bhandarkar wrote: > Since you're modifying gdata_download_observer, could you manually test uploads ...
8 years, 5 months ago (2012-07-21 21:54:56 UTC) #7
achuithb
lgtm http://codereview.chromium.org/10815008/diff/4012/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc File chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc (right): http://codereview.chromium.org/10815008/diff/4012/chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc#newcode680 chrome/browser/chromeos/gdata/gdata_file_system_proxy.cc:680: scoped_ptr<gdata::GDataEntryProtoVector> proto_entries) { same http://codereview.chromium.org/10815008/diff/4012/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h File chrome/browser/chromeos/gdata/gdata_file_system_proxy.h (right): ...
8 years, 5 months ago (2012-07-21 22:34:18 UTC) #8
satorux1
8 years, 5 months ago (2012-07-21 23:23:36 UTC) #9
http://codereview.chromium.org/10815008/diff/4012/chrome/browser/chromeos/gda...
File chrome/browser/chromeos/gdata/gdata_file_system_proxy.h (right):

http://codereview.chromium.org/10815008/diff/4012/chrome/browser/chromeos/gda...
chrome/browser/chromeos/gdata/gdata_file_system_proxy.h:125:
scoped_ptr<gdata::GDataEntryProtoVector> proto_entries);
On 2012/07/21 22:34:19, achuith.bhandarkar wrote:
> nit: Don't think you need gdata::

There are many places gdata:: prefix is used in this and the .cc file. I'll
revemo them in a separate patch.
http://code.google.com/p/chromium/issues/detail?id=138418

Powered by Google App Engine
This is Rietveld 408576698