Bug 1457084 - Increase max chunk memory usage limit, r=mayhemer

We can hit the limit very easily when writing javascript bytecode as alternative data to the cache entry because all data is written at once but CacheFileOutputStream splits it into chunks which are then written on a backgound thread. 40MB was chosen because bytecode is usually 4x-10x larger than the original data, so it can occupy most of the cache entry which is limited to 50MB.
This commit is contained in:
Michal Novotny 2018-05-23 05:03:00 +03:00
parent f9b87f1b40
commit 574a724d01
2 changed files with 4 additions and 4 deletions

View File

@ -62,8 +62,8 @@ pref("browser.cache.memory.max_entry_size", 5120);
// (priority) like html, css, fonts and js, and one for other data like images, // (priority) like html, css, fonts and js, and one for other data like images,
// video, etc. // video, etc.
// Note: 0 means no limit. // Note: 0 means no limit.
pref("browser.cache.disk.max_chunks_memory_usage", 10240); pref("browser.cache.disk.max_chunks_memory_usage", 40960);
pref("browser.cache.disk.max_priority_chunks_memory_usage", 10240); pref("browser.cache.disk.max_priority_chunks_memory_usage", 40960);
pref("browser.cache.disk_cache_ssl", true); pref("browser.cache.disk_cache_ssl", true);
// 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically // 0 = once-per-session, 1 = each-time, 2 = never, 3 = when-appropriate/automatically

View File

@ -62,10 +62,10 @@ int32_t CacheObserver::sMaxMemoryEntrySize = kDefaultMaxMemoryEntrySize;
static int32_t const kDefaultMaxDiskEntrySize = 50 * 1024; // 50 MB static int32_t const kDefaultMaxDiskEntrySize = 50 * 1024; // 50 MB
int32_t CacheObserver::sMaxDiskEntrySize = kDefaultMaxDiskEntrySize; int32_t CacheObserver::sMaxDiskEntrySize = kDefaultMaxDiskEntrySize;
static uint32_t const kDefaultMaxDiskChunksMemoryUsage = 10 * 1024; // 10MB static uint32_t const kDefaultMaxDiskChunksMemoryUsage = 40 * 1024; // 40MB
uint32_t CacheObserver::sMaxDiskChunksMemoryUsage = kDefaultMaxDiskChunksMemoryUsage; uint32_t CacheObserver::sMaxDiskChunksMemoryUsage = kDefaultMaxDiskChunksMemoryUsage;
static uint32_t const kDefaultMaxDiskPriorityChunksMemoryUsage = 10 * 1024; // 10MB static uint32_t const kDefaultMaxDiskPriorityChunksMemoryUsage = 40 * 1024; // 40MB
uint32_t CacheObserver::sMaxDiskPriorityChunksMemoryUsage = kDefaultMaxDiskPriorityChunksMemoryUsage; uint32_t CacheObserver::sMaxDiskPriorityChunksMemoryUsage = kDefaultMaxDiskPriorityChunksMemoryUsage;
static uint32_t const kDefaultCompressionLevel = 1; static uint32_t const kDefaultCompressionLevel = 1;