Increase image cache size and adjust related parameters for improved performance

This commit is contained in:
ownedbywuigi 2026-03-27 15:23:58 +00:00
commit 35aa94b223
3 changed files with 52 additions and 8 deletions

View file

@ -4275,11 +4275,15 @@ pref("image.animated.decode-on-demand.batch-size", 6);
pref("image.animated.resume-from-last-displayed", true);
// The maximum size, in bytes, of the decoded images we cache
pref("image.cache.size", 5242880);
pref("image.cache.size", 20971520);
// A weight, from 0-1000, to place on time when comparing to size.
// Size is given a weight of 1000 - timeweight.
pref("image.cache.timeweight", 500);
pref("image.cache.timeweight", 650);
// Time in seconds before unproxied entries in the in-memory image cache are
// considered for eviction by the expiration tracker.
pref("image.cache.entry_timeout_seconds", 15);
// Decode all images automatically on load, ignoring our normal heuristics.
pref("image.decode-immediately.enabled", false);
@ -4326,7 +4330,7 @@ pref("image.mem.decode_bytes_at_a_time", 16384);
// Minimum timeout for expiring unused images from the surface cache, in
// milliseconds. This controls how long we store cached temporary surfaces.
pref("image.mem.surfacecache.min_expiration_ms", 60000); // 60s
pref("image.mem.surfacecache.min_expiration_ms", 180000); // 180s
// Maximum size for the surface cache, in kilobytes.
pref("image.mem.surfacecache.max_size_kb", 1048576); // 1GB
@ -4343,7 +4347,7 @@ pref("image.mem.surfacecache.size_factor", 4);
// surface cache on memory pressure, a discard factor of 2 means to discard half
// of the data, and so forth. The default should be a good balance for desktop
// and laptop systems, where we never discard visible images.
pref("image.mem.surfacecache.discard_factor", 1);
pref("image.mem.surfacecache.discard_factor", 2);
// How many threads we'll use for multithreaded decoding. If < 0, will be
// automatically determined based on the system's number of cores.