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

Unified Diff: chrome/common/important_file_writer.cc

Issue 6713033: Tweak commit interval for ScheduleSavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comments + changed ifdef Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/important_file_writer.cc
diff --git a/chrome/common/important_file_writer.cc b/chrome/common/important_file_writer.cc
index f5c5fc115c1dcee81bc86f71d7c32235b8264c76..3271be5b228f7d2bfca98e05df2a3cd8804d5c26 100644
--- a/chrome/common/important_file_writer.cc
+++ b/chrome/common/important_file_writer.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,16 @@ using base::TimeDelta;
namespace {
-const int kDefaultCommitIntervalMs = 10000;
+#if defined(OFFICIAL_BUILD) || defined(GOOGLE_CHROME_BUILD)
brettw 2011/03/21 05:59:31 This seems like a much much worse idea than NDEBUG
Denis Lagno 2011/03/21 13:07:21 another attempt..
+// 2 seconds interval provides reasonable optimization by coalescing burst of
+// writes yet this value is reasonably low to be safe.
+const int kDefaultCommitIntervalMs = 2000;
+#else
+// For development builds we increase commit interval in order to ease
+// manifestation of bugs caused by some exit path failing to commit pending
+// writes.
+const int kDefaultCommitIntervalMs = 60000;
+#endif
class WriteToDiskTask : public Task {
public:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698