diff options
author | qiankun.miao@intel.com <qiankun.miao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 11:10:50 +0000 |
---|---|---|
committer | qiankun.miao@intel.com <qiankun.miao@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 11:10:50 +0000 |
commit | a2a7ea0e60a3bde4056b04e0c93bc8b2cf90f7e2 (patch) | |
tree | 573cc273ac05a5c9d012c00f5a4d4c55f9ce1c30 /build/internal | |
parent | c6bd532ff93cae6f923bfc753efc1604620081d0 (diff) | |
download | chromium_src-a2a7ea0e60a3bde4056b04e0c93bc8b2cf90f7e2.zip chromium_src-a2a7ea0e60a3bde4056b04e0c93bc8b2cf90f7e2.tar.gz chromium_src-a2a7ea0e60a3bde4056b04e0c93bc8b2cf90f7e2.tar.bz2 |
Improve the performance of CRX installation
When install a CRX entension, there is a step for moving the extracted
extension to a temp folder under the profile which will then be moved to
the final destination. The first move is implemented by a copy+delete
currently. The reason of this implementation is Move will attempt rename
instead of moving it into the destination folder as expected. For
example, Move("/a/b/c", "/1/2/3") (c and 3 are both folders here) if
directory named "3" doestn't exist, the move operation will
move all contents in c to "/1/2/3/" behaving as a rename operation
instead of moving c as a subfolder; if directory named "3" already
exists, the move operation will fallback to copy+delete as
implementation in file_util_win/posix.cc.
In this patch, if "/a/b/c" is being moved into "/1/2/3" as a
subfolder, Move("/a/b/c", "/1/2/3/c") will be called. Because move is
faster than copy+delete, it will speedup the CRX extension installation.
For the from_path and to_path are in different volume, Move will
fallback to CopyAndDeleteDirectory (in file_util_win.cc) or
CopyDirectory+Delete (in file_util_posix.cc).
BUG=
TESTS=
Review URL: https://chromiumcodereview.appspot.com/11085068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/internal')
0 files changed, 0 insertions, 0 deletions