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

Unified Diff: chrome/browser/history/text_database.cc

Issue 8379009: Add a field trial for using lower sqlite cache sizes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: chrome/browser/history/text_database.cc
===================================================================
--- chrome/browser/history/text_database.cc (revision 106923)
+++ chrome/browser/history/text_database.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/diagnostics/sqlite_diagnostics.h"
+#include "chrome/browser/history/history_field_trial.h"
#include "sql/statement.h"
#include "sql/transaction.h"
@@ -138,7 +139,13 @@
// have 2-3 of these objects, each with their own 8MB, this adds up very fast.
// We therefore reduce the size so when there are multiple objects, we're not
// too big.
- db_.set_cache_size(512);
+ if (HistoryFieldTrial::IsLowMemFieldTrial()) {
+ // FTS does merges of 16 pages at a time, so we need a working set size
+ // somewhat greater than that to prevent too much thrashing.
+ db_.set_cache_size(40);
+ } else {
+ db_.set_cache_size(512);
jar (doing other things) 2011/10/24 18:40:55 Rather than having exactly two choices, have you c
Scott Hess - ex-Googler 2011/10/24 19:15:27 Wait - from our chat I thought this was 32, which
brettw 2011/10/25 01:55:02 How about I'll change this to 128. Depending on wh
Scott Hess - ex-Googler 2011/10/26 21:44:59 OK, seems reasonable. One "thing" about having ju
+ }
// Run the database in exclusive mode. Nobody else should be accessing the
// database while we're running, and this will give somewhat improved perf.
« chrome/browser/history/in_memory_database.cc ('K') | « chrome/browser/history/in_memory_database.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698