Skip to content

Commit eb9600f

Browse files
authored
Add betterfox fastfox.js
1 parent adc4e43 commit eb9600f

File tree

11 files changed

+102
-18
lines changed

11 files changed

+102
-18
lines changed

app/profile/firefox.js

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ pref("browser.startup.couldRestoreSession.count", 0);
311311
// Show a skeleton UI window prior to loading libxul. Only visible for windows
312312
// users as it is not implemented anywhere else.
313313
#if defined(XP_WIN)
314-
pref("browser.startup.preXulSkeletonUI", true);
314+
pref("browser.startup.preXulSkeletonUI", false);
315315
#endif
316316

317317
// Show an upgrade dialog on major upgrades.
@@ -371,7 +371,7 @@ pref("browser.urlbar.autoFill.adaptiveHistory.enabled", false);
371371
pref("browser.urlbar.autoFill.adaptiveHistory.minCharsThreshold", 0);
372372

373373
// Whether to warm up network connections for autofill or search results.
374-
pref("browser.urlbar.speculativeConnect.enabled", true);
374+
pref("browser.urlbar.speculativeConnect.enabled", false);
375375

376376
// Whether bookmarklets should be filtered out of Address Bar matches.
377377
// This is enabled for security reasons, when true it is still possible to
@@ -1234,7 +1234,7 @@ pref("places.frecency.origins.alternative.featureGate", false);
12341234
pref("places.forgetThisSite.clearByBaseDomain", true);
12351235

12361236
// Whether to warm up network connections for places: menus and places: toolbar.
1237-
pref("browser.places.speculativeConnect.enabled", true);
1237+
pref("browser.places.speculativeConnect.enabled", false);
12381238

12391239
// if true, use full page zoom instead of text zoom
12401240
pref("browser.zoom.full", true);
@@ -1552,6 +1552,39 @@ pref("general.useragent.compatMode.firefox", true);
15521552
// CustomizableUI state of the browser's user interface
15531553
pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"home-button\",\"urlbar-container\",\"downloads-button\",\"developer-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"import-button\",\"personal-bookmarks\"]},\"seen\":[\"developer-button\"],\"dirtyAreaCache\":[\"PersonalToolbar\",\"nav-bar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19,\"newElementCount\":0}");
15541554
// pref("browser.uiCustomization.autoAdd", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"home-button\",\"urlbar-container\",\"downloads-button\",\"developer-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"import-button\",\"personal-bookmarks\"]},\"seen\":[\"developer-button\"],\"dirtyAreaCache\":[\"PersonalToolbar\",\"nav-bar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19,\"newElementCount\":0}");
1555+
1556+
// Betterfox Fastfox.js
1557+
1558+
user_pref("nglayout.initialpaint.delay", 0); // default=5; used to be 250
1559+
user_pref("nglayout.initialpaint.delay_in_oopif", 0); // default=5
1560+
user_pref("content.notify.interval", 100000); // (.10s); default=120000 (.12s)
1561+
user_pref("layout.css.grid-template-masonry-value.enabled", true);
1562+
user_pref("dom.enable_web_task_scheduling", true);
1563+
user_pref("layout.css.has-selector.enabled", true);
1564+
user_pref("gfx.canvas.accelerated.cache-items", 4096); // default=2048; alt=8192
1565+
user_pref("gfx.canvas.accelerated.cache-size", 512); // default=256; alt=1024
1566+
user_pref("gfx.content.skia-font-cache-size", 20); // default=5; Chrome=20
1567+
user_pref("media.memory_cache_max_size", 65536); // default=8192; AF=65536; alt=131072
1568+
user_pref("media.cache_readahead_limit", 7200); // 120 min; default=60; stop reading ahead when our buffered data is this many seconds ahead of the current playback
1569+
user_pref("media.cache_resume_threshold", 3600); // 60 min; default=30; when a network connection is suspended, don't resume it until the amount of buffered data falls below this threshold
1570+
user_pref("image.mem.decode_bytes_at_a_time", 32768); // default=16384; alt=65536; chunk size for calls to the image decoders
1571+
user_pref("network.buffer.cache.size", 262144); // 256 kb; default=32768 (32 kb)
1572+
user_pref("network.buffer.cache.count", 128); // default=24
1573+
user_pref("network.http.max-connections", 1800); // default=900
1574+
user_pref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive
1575+
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3
1576+
user_pref("network.websocket.max-connections", 400); // default=200
1577+
user_pref("network.http.pacing.requests.enabled", false);
1578+
user_pref("network.dnsCacheEntries", 10000); // default=400
1579+
user_pref("network.dnsCacheExpiration", 86400); // keep entries for 1 day; alt=3600 (1 hour)
1580+
user_pref("network.dns.max_high_priority_threads", 8); // default=5
1581+
user_pref("network.ssl_tokens_cache_capacity", 20480); // default=2048; more TLS token caching (fast reconnects)
1582+
user_pref("network.http.speculative-parallel-limit", 0);
1583+
user_pref("network.dns.disablePrefetch", true);
1584+
user_pref("network.prefetch-next", false);
1585+
user_pref("network.predictor.enabled", false);
1586+
user_pref("network.predictor.enable-prefetch", false);
1587+
15551588
// END MISC MERCURY SETTINGS
15561589

15571590
// A preference which, if false, means sync will only apply incoming preference

bootstrap.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ printf "${YEL}Bootstrapping Mozilla Repo...\n" &&
2020
printf "${GRE}\n" &&
2121
tput sgr0 &&
2222

23-
cd $HOME &&
23+
mkdir -p /c/mozilla-source/ &&
24+
cd /c/mozilla-source/ &&
25+
2426
curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O &&
2527
python3 bootstrap.py
2628

build.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,20 @@ case $1 in
2727
--help) displayHelp; exit 0;;
2828
esac
2929

30+
# mozilla source dir env variable
31+
if [ -z "${HG_SRC_DIR}" ]; then
32+
HG_SRC_DIR="$HOME/mozilla-unified"
33+
export HG_SRC_DIR
34+
else
35+
HG_SRC_DIR="${HG_SRC_DIR}"
36+
export HG_SRC_DIR
37+
fi
38+
3039
printf "\n" &&
3140
printf "${GRE}Building Mercury...\n" &&
3241
printf "${CYA}\n" &&
3342

34-
cd $HOME/mozilla-unified &&
43+
cd ${HG_SRC_DIR} &&
3544

3645
./mach build -v &&
3746

mozconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ac_add_options --disable-crashreporter
5151
ac_add_options --disable-updater
5252
ac_add_options --without-wasm-sandboxed-libraries
5353
# ac_add_options --disable-default-browser-agent
54+
export MOZ_SOURCE_CHANGESET=${changeset}
5455
mk_add_options MOZ_CRASHREPORTER=0
5556
mk_add_options MOZ_DATA_REPORTING=0
5657
mk_add_options MOZ_SERVICES_HEALTHREPORT=0

mozconfig-sse4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ ac_add_options --disable-crashreporter
5151
ac_add_options --disable-updater
5252
ac_add_options --without-wasm-sandboxed-libraries
5353
# ac_add_options --disable-default-browser-agent
54+
export MOZ_SOURCE_CHANGESET=${changeset}
5455
mk_add_options MOZ_CRASHREPORTER=0
5556
mk_add_options MOZ_DATA_REPORTING=0
5657
mk_add_options MOZ_SERVICES_HEALTHREPORT=0

mozconfig-win

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ ac_add_options --disable-maintenance-service
5656
ac_add_options --without-wasm-sandboxed-libraries
5757
ac_add_options --disable-bits-download
5858
# ac_add_options --disable-default-browser-agent
59+
export MOZ_SOURCE_CHANGESET=${changeset}
5960
mk_add_options MOZ_CRASHREPORTER=0
6061
mk_add_options MOZ_DATA_REPORTING=0
6162
mk_add_options MOZ_SERVICES_HEALTHREPORT=0

mozconfig-win-cross

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ ac_add_options --disable-maintenance-service
6363
ac_add_options --without-wasm-sandboxed-libraries
6464
ac_add_options --disable-bits-download
6565
ac_add_options --disable-default-browser-agent
66+
export MOZ_SOURCE_CHANGESET=${changeset}
6667
mk_add_options MOZ_CRASHREPORTER=0
6768
mk_add_options MOZ_DATA_REPORTING=0
6869
mk_add_options MOZ_SERVICES_HEALTHREPORT=0

package.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,23 @@ case $1 in
2727
--help) displayHelp; exit 0;;
2828
esac
2929

30+
# mozilla source dir env variable
31+
if [ -z "${HG_SRC_DIR}" ]; then
32+
HG_SRC_DIR="$HOME/mozilla-unified"
33+
export HG_SRC_DIR
34+
else
35+
HG_SRC_DIR="${HG_SRC_DIR}"
36+
export HG_SRC_DIR
37+
fi
38+
3039
printf "\n" &&
3140
printf "${YEL}Packaging Mercury..\n" &&
3241
printf "${GRE}\n" &&
3342

34-
# Build Thorium
43+
# Build Mercury
3544
export NINJA_SUMMARIZE_BUILD=1 &&
3645

37-
cd $HOME/mozilla-unified &&
46+
cd ${HG_SRC_DIR} &&
3847

3948
./mach package -v &&
4049

run.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,20 @@ case $1 in
2525
--help) displayHelp; exit 0;;
2626
esac
2727

28+
# mozilla source dir env variable
29+
if [ -z "${HG_SRC_DIR}" ]; then
30+
HG_SRC_DIR="$HOME/mozilla-unified"
31+
export HG_SRC_DIR
32+
else
33+
HG_SRC_DIR="${HG_SRC_DIR}"
34+
export HG_SRC_DIR
35+
fi
36+
2837
printf "\n" &&
2938
printf "${bold}${GRE}Script to run Mercury in dev mode.${c0}\n" &&
3039
printf "\n" &&
3140
tput sgr0 &&
3241

33-
cd $HOME/mozilla-unified &&
42+
cd ${HG_SRC_DIR} &&
3443

3544
./mach run

setup.sh

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,30 @@ case $1 in
2929
--help) displayHelp; exit 0;;
3030
esac
3131

32+
# mozilla source dir env variable
33+
if [ -z "${HG_SRC_DIR}" ]; then
34+
HG_SRC_DIR="$HOME/mozilla-unified"
35+
export HG_SRC_DIR
36+
else
37+
HG_SRC_DIR="${HG_SRC_DIR}"
38+
export HG_SRC_DIR
39+
fi
40+
3241
printf "\n" &&
3342
printf "${YEL}Copying Mercury source files over the Mozilla tree...${c0}\n" &&
3443

35-
cp -r -v app/. $HOME/mozilla-unified/browser/app/ &&
36-
cp -r -v browser/. $HOME/mozilla-unified/browser/ &&
37-
cp -r -v build/. $HOME/mozilla-unified/build/ &&
38-
cp -r -v other-licenses/. $HOME/mozilla-unified/other-licenses/ &&
39-
cp -r -v toolkit/. $HOME/mozilla-unified/toolkit/ &&
40-
cp -r -v mozconfig $HOME/mozilla-unified/ &&
44+
cp -r -v app/. ${HG_SRC_DIR}/browser/app/ &&
45+
cp -r -v browser/. ${HG_SRC_DIR}/browser/ &&
46+
cp -r -v build/. ${HG_SRC_DIR}/build/ &&
47+
cp -r -v other-licenses/. ${HG_SRC_DIR}/other-licenses/ &&
48+
cp -r -v toolkit/. ${HG_SRC_DIR}/toolkit/ &&
49+
cp -r -v mozconfig ${HG_SRC_DIR} &&
4150

4251
copyWin () {
4352
printf "\n" &&
4453
printf "${GRE}Copying Windows (Native Build) mozconfig${c0}\n" &&
4554
printf "\n" &&
46-
cp -r -v mozconfig-win $HOME/mozilla-unified/mozconfig
55+
cp -r -v mozconfig-win ${HG_SRC_DIR}/mozconfig
4756
}
4857
case $1 in
4958
--win) copyWin;
@@ -53,7 +62,7 @@ copyWinCross () {
5362
printf "\n" &&
5463
printf "${GRE}Copying Windows (Cross Compile) mozconfig${c0}\n" &&
5564
printf "\n" &&
56-
cp -r -v mozconfig-win-cross $HOME/mozilla-unified/mozconfig
65+
cp -r -v mozconfig-win-cross ${HG_SRC_DIR}/mozconfig
5766
}
5867
case $1 in
5968
--cross) copyWinCross;
@@ -63,7 +72,7 @@ copySSE41 () {
6372
printf "\n" &&
6473
printf "${GRE}Copying SSE4.1 mozconfig${c0}\n" &&
6574
printf "\n" &&
66-
cp -r -v mozconfig-sse4 $HOME/mozilla-unified/mozconfig
75+
cp -r -v mozconfig-sse4 ${HG_SRC_DIR}/mozconfig
6776
}
6877
case $1 in
6978
--sse4) copySSE41;

0 commit comments

Comments
 (0)