diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-30 17:41:14 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-30 17:41:14 +0000 |
commit | 254e043ce9545e1af39c76047b6264ae95c963cf (patch) | |
tree | e4c4cefc6e50f95f54a4f7f980614376692d141a /base/mac_util.mm | |
parent | 2ca84363bf3652670ad2872886943b4c74fbf403 (diff) | |
download | chromium_src-254e043ce9545e1af39c76047b6264ae95c963cf.zip chromium_src-254e043ce9545e1af39c76047b6264ae95c963cf.tar.gz chromium_src-254e043ce9545e1af39c76047b6264ae95c963cf.tar.bz2 |
[Mac] address perf regressions on bots
This isn't the prettiest, but it should get the perf back where we want it. If the file we're asked to exclude is in /var or /private, ignore it. The problem on the bots is the TimeMachine prefs plist is growing unbounded as we keep adding 4 files each run for temporary profiles. The load/modify/write gets slower with each addition. This quick/dirty check to avoid that. Since the original bug for the backup of this data is still open, I figure landing this is the right thing to do until that is fully addressed.
BUG=25959,30002
TEST=page cycles, browser_tests all get back to being fast. normal profiles still exclude the files listed in the first bug.
Review URL: http://codereview.chromium.org/523024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac_util.mm')
-rw-r--r-- | base/mac_util.mm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm index f585233..f6d5dff 100644 --- a/base/mac_util.mm +++ b/base/mac_util.mm @@ -240,6 +240,19 @@ FilePath GetAppBundlePath(const FilePath& exec_name) { bool SetFileBackupExclusion(const FilePath& file_path, bool exclude) { NSString* filePath = [NSString stringWithUTF8String:file_path.value().c_str()]; + + // If being asked to exclude something in a temp directory, just lie and say + // it was done. TimeMachine will already ignore temp directories. This keeps + // the temporary profiles used by unittests from being added to the exclude + // list. Otherwise, as the list grows the bots slow down due to + // reading/writes all the temporary profiles used over time. + if ([filePath hasPrefix:@"/tmp/"] || + [filePath hasPrefix:@"/var/tmp/"] || + [filePath hasPrefix:@"/private/tmp/"] || + [filePath hasPrefix:@"/private/var/tmp/"]) { + return true; + } + NSURL* url = [NSURL fileURLWithPath:filePath]; // Note that we always set CSBackupSetItemExcluded's excludeByPath param // to true. This prevents a problem with toggling the setting: if the file |