зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1562305 - Make browser.cache.disk.preload_chunk_count a static pref. r=michal
Differential Revision: https://phabricator.services.mozilla.com/D37186 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
eb49662142
Коммит
88e439b4ec
|
@ -775,6 +775,15 @@ VARCACHE_PREF(
|
|||
RelaxedAtomicUint32, 1024 // 1MB
|
||||
)
|
||||
|
||||
// The number of chunks we preload ahead of read. One chunk currently has
|
||||
// 256kB.
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
"browser.cache.disk.preload_chunk_count",
|
||||
browser_cache_disk_preload_chunk_count,
|
||||
RelaxedAtomicUint32, 4 // 1 MB of read ahead
|
||||
)
|
||||
|
||||
// Whether Content Blocking Third-Party Cookies UI has been enabled.
|
||||
VARCACHE_PREF(
|
||||
Live,
|
||||
|
|
|
@ -50,8 +50,6 @@ pref("browser.cache.disk.max_priority_chunks_memory_usage", 40960);
|
|||
pref("browser.cache.disk_cache_ssl", true);
|
||||
// 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically
|
||||
pref("browser.cache.check_doc_frequency", 3);
|
||||
// The number of chunks we preload ahead of read. One chunk has currently 256kB.
|
||||
pref("browser.cache.disk.preload_chunk_count", 4); // 1 MB of read ahead
|
||||
// The half life used to re-compute cache entries frecency in hours.
|
||||
pref("browser.cache.frecency_half_life_hours", 6);
|
||||
|
||||
|
|
|
@ -33,9 +33,6 @@ static uint32_t const kDefaultDiskCacheCapacity = 250 * 1024; // 250 MB
|
|||
Atomic<uint32_t, Relaxed> CacheObserver::sDiskCacheCapacity(
|
||||
kDefaultDiskCacheCapacity);
|
||||
|
||||
static uint32_t const kDefaultPreloadChunkCount = 4;
|
||||
uint32_t CacheObserver::sPreloadChunkCount = kDefaultPreloadChunkCount;
|
||||
|
||||
static int32_t const kDefaultMaxMemoryEntrySize = 4 * 1024; // 4 MB
|
||||
int32_t CacheObserver::sMaxMemoryEntrySize = kDefaultMaxMemoryEntrySize;
|
||||
|
||||
|
@ -127,10 +124,6 @@ void CacheObserver::AttachToPreferences() {
|
|||
"browser.cache.disk.capacity",
|
||||
kDefaultDiskCacheCapacity);
|
||||
|
||||
mozilla::Preferences::AddUintVarCache(
|
||||
&sPreloadChunkCount, "browser.cache.disk.preload_chunk_count",
|
||||
kDefaultPreloadChunkCount);
|
||||
|
||||
mozilla::Preferences::AddIntVarCache(&sMaxDiskEntrySize,
|
||||
"browser.cache.disk.max_entry_size",
|
||||
kDefaultMaxDiskEntrySize);
|
||||
|
|
|
@ -53,7 +53,9 @@ class CacheObserver : public nsIObserver, public nsSupportsWeakReference {
|
|||
static bool SmartCacheSizeEnabled() {
|
||||
return StaticPrefs::browser_cache_disk_smart_size_enabled();
|
||||
}
|
||||
static uint32_t PreloadChunkCount() { return sPreloadChunkCount; }
|
||||
static uint32_t PreloadChunkCount() {
|
||||
return StaticPrefs::browser_cache_disk_preload_chunk_count();
|
||||
}
|
||||
static uint32_t MaxMemoryEntrySize() // result in kilobytes.
|
||||
{
|
||||
return sMaxMemoryEntrySize;
|
||||
|
@ -107,7 +109,6 @@ class CacheObserver : public nsIObserver, public nsSupportsWeakReference {
|
|||
|
||||
static int32_t sAutoMemoryCacheCapacity;
|
||||
static Atomic<uint32_t, Relaxed> sDiskCacheCapacity;
|
||||
static uint32_t sPreloadChunkCount;
|
||||
static int32_t sMaxMemoryEntrySize;
|
||||
static int32_t sMaxDiskEntrySize;
|
||||
static uint32_t sMaxDiskChunksMemoryUsage;
|
||||
|
|
Загрузка…
Ссылка в новой задаче