mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 17:39:59 +02:00
Update bytecode cache strategy for experimental Zen features
This commit is contained in:
parent
c2dd526195
commit
aa4d950be1
2 changed files with 45 additions and 0 deletions
|
@ -118,6 +118,10 @@ pref('browser.migrate.opera.enabled', true);
|
||||||
|
|
||||||
pref('xpinstall.signatures.required', false);
|
pref('xpinstall.signatures.required', false);
|
||||||
|
|
||||||
|
// Experimental Zen Features
|
||||||
|
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
|
||||||
|
pref('dom.script_loader.bytecode_cache.strategy', 2);
|
||||||
|
|
||||||
#include better-fox.js
|
#include better-fox.js
|
||||||
|
|
||||||
// Betterfox overrides (Stay below the include directive)
|
// Betterfox overrides (Stay below the include directive)
|
||||||
|
|
41
src/dom/script/ScriptLoader-cpp.patch
Normal file
41
src/dom/script/ScriptLoader-cpp.patch
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
|
||||||
|
index e65533af04ea5f42c10477314c594c2c7bbc67b3..df4d63dafb838b67e64a91f26487106a77494516 100644
|
||||||
|
--- a/dom/script/ScriptLoader.cpp
|
||||||
|
+++ b/dom/script/ScriptLoader.cpp
|
||||||
|
@@ -2401,6 +2401,36 @@ void ScriptLoader::CalculateBytecodeCacheFlag(ScriptLoadRequest* aRequest) {
|
||||||
|
hasFetchCountMin = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ case 1: {
|
||||||
|
+ // 1!
|
||||||
|
+ hasSourceLengthMin = true;
|
||||||
|
+ hasFetchCountMin = true;
|
||||||
|
+ sourceLengthMin = 1024;
|
||||||
|
+ // If we were to optimize only for speed, without considering the impact
|
||||||
|
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||||
|
+ fetchCountMin = 1;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ case 2: {
|
||||||
|
+ // 2!
|
||||||
|
+ hasSourceLengthMin = true;
|
||||||
|
+ hasFetchCountMin = true;
|
||||||
|
+ sourceLengthMin = 1024;
|
||||||
|
+ // If we were to optimize only for speed, without considering the impact
|
||||||
|
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||||
|
+ fetchCountMin = 2;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ case 3: {
|
||||||
|
+ // 3!
|
||||||
|
+ hasSourceLengthMin = true;
|
||||||
|
+ hasFetchCountMin = true;
|
||||||
|
+ sourceLengthMin = 1024;
|
||||||
|
+ // If we were to optimize only for speed, without considering the impact
|
||||||
|
+ // on memory, we should set this threshold to 2. (Bug 900784 comment 120)
|
||||||
|
+ fetchCountMin = 3;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
default:
|
||||||
|
case 0: {
|
||||||
|
hasSourceLengthMin = true;
|
Loading…
Add table
Add a link
Reference in a new issue