diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 23:52:40 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 23:52:40 +0000 |
commit | 8df3407d293c6895ed8f95ad85c29bbef23443a5 (patch) | |
tree | 5fe723e790f74b0095ef519230c8aab31772a733 /net/disk_cache/backend_impl.cc | |
parent | fcc21e89ce697257c2d64debe116c2df77ac7e6a (diff) | |
download | chromium_src-8df3407d293c6895ed8f95ad85c29bbef23443a5.zip chromium_src-8df3407d293c6895ed8f95ad85c29bbef23443a5.tar.gz chromium_src-8df3407d293c6895ed8f95ad85c29bbef23443a5.tar.bz2 |
Disk Cache: Lower the definition of a loaded system from
10 pending operations to 5.
Data from the Beta channel shows that for all group sizes
except one, the 99.90% cutoff of number of pending
operations falls below 5 (in fact, below 3).
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/164355
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/backend_impl.cc')
-rw-r--r-- | net/disk_cache/backend_impl.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc index 506ab22..5af790f 100644 --- a/net/disk_cache/backend_impl.cc +++ b/net/disk_cache/backend_impl.cc @@ -797,7 +797,10 @@ void BackendImpl::TooMuchStorageRequested(int32 size) { bool BackendImpl::IsLoaded() const { CACHE_UMA(COUNTS, "PendingIO", GetSizeGroup(), num_pending_io_); - return num_pending_io_ > 10; + if (user_flags_ & kNoLoadProtection) + return false; + + return num_pending_io_ > 5; } std::string BackendImpl::HistogramName(const char* name, int experiment) const { @@ -1589,10 +1592,7 @@ bool BackendImpl::CheckIndex() { AdjustMaxCacheSize(data_->header.table_len); - // We need to avoid integer overflows. - DCHECK(max_size_ < kint32max - kint32max / 10); - if (data_->header.num_bytes < 0 || - data_->header.num_bytes > max_size_ + max_size_ / 10) { + if (data_->header.num_bytes < 0) { LOG(ERROR) << "Invalid cache (current) size"; return false; } |