Bug 1347174 - per comment 10, limit the readahead size to prevent cache thrashing. draft
authorJW Wang <jwwang@mozilla.com>
Thu, 27 Apr 2017 10:35:08 +0800
changeset 572401 107eb5fbe113962c0f53e95e11625d7ae6f24d52
parent 572162 b25ad0674afd563e888dc07981baa626e8d794db
child 572402 4108aa23cffe9adbc50241b5eb3ecae317273cc2
push id57066
push userjwwang@mozilla.com
push dateThu, 04 May 2017 05:47:33 +0000
bugs1347174
milestone55.0a1
Bug 1347174 - per comment 10, limit the readahead size to prevent cache thrashing. MozReview-Commit-ID: Ellinh8JIYE
modules/libpref/init/all.js
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -291,21 +291,21 @@ pref("mathml.disabled",    false);
 pref("mathml.scale_stretchy_operators.enabled", true);
 
 pref("media.dormant-on-pause-timeout-ms", 5000);
 
 // Media cache size in kilobytes
 pref("media.cache_size", 512000);
 // When a network connection is suspended, don't resume it until the
 // amount of buffered data falls below this threshold (in seconds).
-pref("media.cache_resume_threshold", 999999);
+pref("media.cache_resume_threshold", 30);
 // Stop reading ahead when our buffered data is this many seconds ahead
 // of the current playback position. This limit can stop us from using arbitrary
 // amounts of network bandwidth prefetching huge videos.
-pref("media.cache_readahead_limit", 999999);
+pref("media.cache_readahead_limit", 60);
 
 // Master HTML5 media volume scale.
 pref("media.volume_scale", "1.0");
 
 // Timeout for wakelock release
 pref("media.wakelock_timeout", 2000);
 
 // Whether we should play videos opened in a "video document", i.e. videos