Commit 213f614c authored by brettw@chromium.org's avatar brettw@chromium.org

Make history expiration more aggressive.

Since we haven't done anything more with history and some users are experiencing larger than expected history files, we can probably now be more aggressive about deleting stuff that isn't so useful.

I changed a number of thresholds:

 - We now keep full text indexed data for 3 months instead of 12.

 - We now expire auto subframe visits after 3 dats instead of 30. I added the rationale in a comment.

 - We now expire 32 visits per iteration instead of 10. This number is always kind of a guesstimate anyway of balancing overhead of a query versus overhead of a delete. Now that we're moving up some thresholds, we'll have a bunch of history to expire and I would rather get this over with faster than spending hours spinning the CPU every 30 seconds. This will also come up for users that haven't used their browsers in a while.
Review URL: http://codereview.chromium.org/8343077

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107969 0039d316-1c4b-4281-b951-d872f2087c98
parent 8896c417
......@@ -29,7 +29,17 @@ namespace {
// The number of days by which the expiration threshold is advanced for items
// that we want to expire early, such as those of AUTO_SUBFRAME transition type.
const int kEarlyExpirationAdvanceDays = 30;
//
// Early expiration stuff is kept around only for edge cases, as subframes
// don't appear in history and the vast majority of them are ads anyway. The
// main use case for these is if you're on a site with links to different
// frames, you'll be able to see those links as visited, and we'll also be
// able to get redirect information for those URLs.
//
// But since these uses are most valuable when you're actually on the site,
// and because these can take up the bulk of your history, we get a lot of
// space savings by deleting them quickly.
const int kEarlyExpirationAdvanceDays = 3;
// Reads all types of visits starting from beginning of time to the given end
// time. This is the most general reader.
......@@ -111,7 +121,7 @@ bool ShouldArchiveVisit(const VisitRow& visit) {
// The number of visits we will expire very time we check for old items. This
// Prevents us from doing too much work any given time.
const int kNumExpirePerIteration = 10;
const int kNumExpirePerIteration = 32;
// The number of seconds between checking for items that should be expired when
// we think there might be more items to expire. This timeout is used when the
......@@ -131,7 +141,7 @@ const int kIndexExpirationDelayMin = 2;
// The number of the most recent months for which we do not want to delete
// the history index files.
const int kStoreHistoryIndexesForMonths = 12;
const int kStoreHistoryIndexesForMonths = 3;
} // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment