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. |