Skip to content

Commit

Permalink
Add betterfox fastfox.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex313031 committed Sep 13, 2023
1 parent adc4e43 commit eb9600f
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 18 deletions.
39 changes: 36 additions & 3 deletions app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pref("browser.startup.couldRestoreSession.count", 0);
// Show a skeleton UI window prior to loading libxul. Only visible for windows
// users as it is not implemented anywhere else.
#if defined(XP_WIN)
pref("browser.startup.preXulSkeletonUI", true);
pref("browser.startup.preXulSkeletonUI", false);
#endif

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

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

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

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

// if true, use full page zoom instead of text zoom
pref("browser.zoom.full", true);
Expand Down Expand Up @@ -1552,6 +1552,39 @@ pref("general.useragent.compatMode.firefox", true);
// CustomizableUI state of the browser's user interface
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}");
// 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}");

// Betterfox Fastfox.js

user_pref("nglayout.initialpaint.delay", 0); // default=5; used to be 250
user_pref("nglayout.initialpaint.delay_in_oopif", 0); // default=5
user_pref("content.notify.interval", 100000); // (.10s); default=120000 (.12s)
user_pref("layout.css.grid-template-masonry-value.enabled", true);
user_pref("dom.enable_web_task_scheduling", true);
user_pref("layout.css.has-selector.enabled", true);
user_pref("gfx.canvas.accelerated.cache-items", 4096); // default=2048; alt=8192
user_pref("gfx.canvas.accelerated.cache-size", 512); // default=256; alt=1024
user_pref("gfx.content.skia-font-cache-size", 20); // default=5; Chrome=20
user_pref("media.memory_cache_max_size", 65536); // default=8192; AF=65536; alt=131072
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
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
user_pref("image.mem.decode_bytes_at_a_time", 32768); // default=16384; alt=65536; chunk size for calls to the image decoders
user_pref("network.buffer.cache.size", 262144); // 256 kb; default=32768 (32 kb)
user_pref("network.buffer.cache.count", 128); // default=24
user_pref("network.http.max-connections", 1800); // default=900
user_pref("network.http.max-persistent-connections-per-server", 10); // default=6; download connections; anything above 10 is excessive
user_pref("network.http.max-urgent-start-excessive-connections-per-host", 5); // default=3
user_pref("network.websocket.max-connections", 400); // default=200
user_pref("network.http.pacing.requests.enabled", false);
user_pref("network.dnsCacheEntries", 10000); // default=400
user_pref("network.dnsCacheExpiration", 86400); // keep entries for 1 day; alt=3600 (1 hour)
user_pref("network.dns.max_high_priority_threads", 8); // default=5
user_pref("network.ssl_tokens_cache_capacity", 20480); // default=2048; more TLS token caching (fast reconnects)
user_pref("network.http.speculative-parallel-limit", 0);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.prefetch-next", false);
user_pref("network.predictor.enabled", false);
user_pref("network.predictor.enable-prefetch", false);

// END MISC MERCURY SETTINGS

// A preference which, if false, means sync will only apply incoming preference
Expand Down
4 changes: 3 additions & 1 deletion bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ printf "${YEL}Bootstrapping Mozilla Repo...\n" &&
printf "${GRE}\n" &&
tput sgr0 &&

cd $HOME &&
mkdir -p /c/mozilla-source/ &&
cd /c/mozilla-source/ &&

curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py -O &&
python3 bootstrap.py

11 changes: 10 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@ case $1 in
--help) displayHelp; exit 0;;
esac

# mozilla source dir env variable
if [ -z "${HG_SRC_DIR}" ]; then
HG_SRC_DIR="$HOME/mozilla-unified"
export HG_SRC_DIR
else
HG_SRC_DIR="${HG_SRC_DIR}"
export HG_SRC_DIR
fi

printf "\n" &&
printf "${GRE}Building Mercury...\n" &&
printf "${CYA}\n" &&

cd $HOME/mozilla-unified &&
cd ${HG_SRC_DIR} &&

./mach build -v &&

Expand Down
1 change: 1 addition & 0 deletions mozconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --without-wasm-sandboxed-libraries
# ac_add_options --disable-default-browser-agent
export MOZ_SOURCE_CHANGESET=${changeset}
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
Expand Down
1 change: 1 addition & 0 deletions mozconfig-sse4
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --without-wasm-sandboxed-libraries
# ac_add_options --disable-default-browser-agent
export MOZ_SOURCE_CHANGESET=${changeset}
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
Expand Down
1 change: 1 addition & 0 deletions mozconfig-win
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ac_add_options --disable-maintenance-service
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --disable-bits-download
# ac_add_options --disable-default-browser-agent
export MOZ_SOURCE_CHANGESET=${changeset}
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
Expand Down
1 change: 1 addition & 0 deletions mozconfig-win-cross
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ac_add_options --disable-maintenance-service
ac_add_options --without-wasm-sandboxed-libraries
ac_add_options --disable-bits-download
ac_add_options --disable-default-browser-agent
export MOZ_SOURCE_CHANGESET=${changeset}
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
Expand Down
13 changes: 11 additions & 2 deletions package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,23 @@ case $1 in
--help) displayHelp; exit 0;;
esac

# mozilla source dir env variable
if [ -z "${HG_SRC_DIR}" ]; then
HG_SRC_DIR="$HOME/mozilla-unified"
export HG_SRC_DIR
else
HG_SRC_DIR="${HG_SRC_DIR}"
export HG_SRC_DIR
fi

printf "\n" &&
printf "${YEL}Packaging Mercury..\n" &&
printf "${GRE}\n" &&

# Build Thorium
# Build Mercury
export NINJA_SUMMARIZE_BUILD=1 &&

cd $HOME/mozilla-unified &&
cd ${HG_SRC_DIR} &&

./mach package -v &&

Expand Down
11 changes: 10 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,20 @@ case $1 in
--help) displayHelp; exit 0;;
esac

# mozilla source dir env variable
if [ -z "${HG_SRC_DIR}" ]; then
HG_SRC_DIR="$HOME/mozilla-unified"
export HG_SRC_DIR
else
HG_SRC_DIR="${HG_SRC_DIR}"
export HG_SRC_DIR
fi

printf "\n" &&
printf "${bold}${GRE}Script to run Mercury in dev mode.${c0}\n" &&
printf "\n" &&
tput sgr0 &&

cd $HOME/mozilla-unified &&
cd ${HG_SRC_DIR} &&

./mach run
27 changes: 18 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,30 @@ case $1 in
--help) displayHelp; exit 0;;
esac

# mozilla source dir env variable
if [ -z "${HG_SRC_DIR}" ]; then
HG_SRC_DIR="$HOME/mozilla-unified"
export HG_SRC_DIR
else
HG_SRC_DIR="${HG_SRC_DIR}"
export HG_SRC_DIR
fi

printf "\n" &&
printf "${YEL}Copying Mercury source files over the Mozilla tree...${c0}\n" &&

cp -r -v app/. $HOME/mozilla-unified/browser/app/ &&
cp -r -v browser/. $HOME/mozilla-unified/browser/ &&
cp -r -v build/. $HOME/mozilla-unified/build/ &&
cp -r -v other-licenses/. $HOME/mozilla-unified/other-licenses/ &&
cp -r -v toolkit/. $HOME/mozilla-unified/toolkit/ &&
cp -r -v mozconfig $HOME/mozilla-unified/ &&
cp -r -v app/. ${HG_SRC_DIR}/browser/app/ &&
cp -r -v browser/. ${HG_SRC_DIR}/browser/ &&
cp -r -v build/. ${HG_SRC_DIR}/build/ &&
cp -r -v other-licenses/. ${HG_SRC_DIR}/other-licenses/ &&
cp -r -v toolkit/. ${HG_SRC_DIR}/toolkit/ &&
cp -r -v mozconfig ${HG_SRC_DIR} &&

copyWin () {
printf "\n" &&
printf "${GRE}Copying Windows (Native Build) mozconfig${c0}\n" &&
printf "\n" &&
cp -r -v mozconfig-win $HOME/mozilla-unified/mozconfig
cp -r -v mozconfig-win ${HG_SRC_DIR}/mozconfig
}
case $1 in
--win) copyWin;
Expand All @@ -53,7 +62,7 @@ copyWinCross () {
printf "\n" &&
printf "${GRE}Copying Windows (Cross Compile) mozconfig${c0}\n" &&
printf "\n" &&
cp -r -v mozconfig-win-cross $HOME/mozilla-unified/mozconfig
cp -r -v mozconfig-win-cross ${HG_SRC_DIR}/mozconfig
}
case $1 in
--cross) copyWinCross;
Expand All @@ -63,7 +72,7 @@ copySSE41 () {
printf "\n" &&
printf "${GRE}Copying SSE4.1 mozconfig${c0}\n" &&
printf "\n" &&
cp -r -v mozconfig-sse4 $HOME/mozilla-unified/mozconfig
cp -r -v mozconfig-sse4 ${HG_SRC_DIR}/mozconfig
}
case $1 in
--sse4) copySSE41;
Expand Down
11 changes: 10 additions & 1 deletion trunk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ case $1 in
--help) displayHelp; exit 0;;
esac

# mozilla source dir env variable
if [ -z "${HG_SRC_DIR}" ]; then
HG_SRC_DIR="$HOME/mozilla-unified"
export HG_SRC_DIR
else
HG_SRC_DIR="${HG_SRC_DIR}"
export HG_SRC_DIR
fi

printf "\n" &&
printf "${bold}${GRE}Script to Rebase/Sync Mozilla repo on Linux.${c0}\n" &&
printf "\n" &&
Expand All @@ -33,7 +42,7 @@ printf "${YEL}Rebasing/Syncing with mozilla-unified Mercurial repository...${c0}
MERCURY_BRANCH="esr115"
export MERCURY_BRANCH &&

cd $HOME/mozilla-unified &&
cd ${HG_SRC_DIR} &&

rm -r -f ./obj-x86_64-pc-linux-gnu &&

Expand Down

0 comments on commit eb9600f

Please sign in to comment.