https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
Make sure the following options are off:
Disable pre-fetching
Rationale: Not doing this will significantly slow down navigation, as Firefox won't prefetch any content before clicking.
https://addons.mozilla.org/en-US/firefox/addon/jslibcache/
Make sure the following options are on:
Allow header modification
Rationale: Otherwise many Javascript libraries won't be fetched from local storage - as they have parameters on their URLs in the HTML code. This isn't going to break any website.`
Make sure to copy the uBlock rules provided, to your uBlock settings, to avoid uBlock interfering:
- Go to the
uBlock rules
- copy them
- Open uBlock's
Dashboard
- Go to the
My rules
tab - Paste them & hit
Save
, thenCommit
https://addons.mozilla.org/en-US/firefox/addon/cache-longer/
Set and forget.
Rationale: Increases the time items will be stored in the browser cache. This increasing the chance that network ressources won't need to be fetched. As NVMe/SSD storage is cheap and lightning fast compared to network requests, this has the potential to improve load times significantly.
- Go to about:preferences#privacy
- Select
Custom
- deactivate all filters in this section
- Scroll down to
Security
->Deceptive Content and Dangerous Software Protection
- Disable
Block dangerous and deceptive content
Rationale: Those filters use a lot of CPU time to process, and are not very helpful - except for newbies. The Dangerous Software
filters may actually even block downloads the user want to fetch, that's why it is recommended to disable these.
network.captive-portal-service.enabled = false # don't try to find captive portals
network.notify.checkForProxies = false # don't try to find proxies
browser.cache.disk.capacity = 8192000 # Increase cache size on disk to 8 GB
browser.cache.disk.smart_size.enabled = false # force a fixed max cache size on disk
browser.cache.frecency_half_life_hours = 18 # lower cache sweep intervals
browser.cache.max_shutdown_io_lag = 16 # let the browser finish more io on shutdown
browser.cache.memory.capacity = 2097152 # fixed maximum 2 GB in memory cache
browser.cache.memory.max_entry_size = 327680 # maximum size of in memory cached objects
browser.cache.disk.metadata_memory_limit = 15360 # increase size (in KB) of "Intermediate memory caching of frequently used metadata (a.k.a. disk cache memory pool)"
gfx.canvas.accelerated = true
gfx.canvas.accelerated.cache-items = 32768
gfx.canvas.accelerated.cache-size = 4096
layers.acceleration.force-enabled = false
gfx.content.skia-font-cache-size = 80
gfx.webrender.all = true
gfx.webrender.compositor = true
gfx.webrender.compositor.force-enabled = true
gfx.webrender.enabled = true
gfx.webrender.precache-shaders = true
gfx.webrender.program-binary-disk = true
gfx.webrender.software.opengl = true
image.mem.decode_bytes_at_a_time = 65536
image.mem.shared.unmap.min_expiration_ms = 120000
layers.gpu-process.enabled = true
layers.gpu-process.force-enabled = true
image.cache.size = 10485760
media.memory_cache_max_size = 1048576
media.memory_caches_combined_limit_kb = 3145728
media.hardware-video-decoding.force-enabled = true
media.ffmpeg.vaapi.enabled = true
network.dns.disablePrefetchFromHTTPS = false
network.dnsCacheEntries = 20000
network.dnsCacheExpiration = 3600
network.dnsCacheExpirationGracePeriod = 240
network.predictor.enable-hover-on-ssl = true
network.predictor.enable-prefetch = true
network.predictor.preconnect-min-confidence = 20
network.predictor.prefetch-force-valid-for = 3600
network.predictor.prefetch-min-confidence = 30
network.predictor.prefetch-rolling-load-count = 120
network.predictor.preresolve-min-confidence = 10
network.ssl_tokens_cache_capacity = 32768 # more TLS token caching (fast reconnects)
fission.autostart = false # disable enhanced protection between threads/processes of the browser (which uses LOADS of memory to do)
privacy.partition.network_state = false # don't seperate the network state (e.g. the cache) by top level domains)
dom.ipc.processCount = 1
dom.ipc.processCount.webIsolated = 1
Rationale: By default Firefox launches as many processes as you got CPU cores. This is highly counter productive, as this leads to much more memory usage as necessary. In addition switching tabs may now result not only in having to load the content back from the swap into memory, but also swapped in duplicated libraries etc.
- Restart firefox
Go to about:support then scroll down to "Places Database" and select "Verify Integrity". This will rewrite the database.
Scroll up again and select "Clear startup cache" on the right side.
- Restart firefox
https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies/
Set and forget.
https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean/
Automatically bypass some paywalls.
Downside: Needs often new permissions, if an update adds a site to the supported list. - You'll get notified with an ! mark on your "hamburger menu" icon.
https://addons.mozilla.org/en-US/firefox/addon/consent-o-matic/
Set and forget.
https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/
Go to settings and make sure the following are off:
- Show Notification After Automatic Cleanup
- Enable Support for Container Tabs
https://addons.mozilla.org/en-US/firefox/addon/sponsorblock/
Configure skip categories to your likings.
- add browser.cache.disk.metadata_memory_limit
- Remove "cache cleaning" from finishing touches (as it's not really necessary and confuses people)
- set layers.acceleration.force-enabled to false (as it may increase CPU usage)
- Remove uBlock Origin's
Disable hyperlink auditing
unckecking recommendation (no idea why I've added that) - Organize Settings for Add-Ons under headlines
- Improve explanation of how to apply JSLibCache's uBlock rules
- Add Rationale to some settings, to avoid that people have to google
- Fix
browser.cache.frecency_half_life_hours
- Minor changes/fixes to formatting
- Reduce process counter down to one
Hey @russeg,
technically the defaults are faster, if you just have a very light usage for your browser, like open 2-3 tabs.
But the defaults are not optimized for heavy usage, where Firefox will spawn a lot of processes, which are only sparsely active.
Reason for this is, that a process is handling a couple of tabs at a time if there are many tabs open.
So if you e.g. got 30 tabs open and 8 virtual CPU cores (because of hyperthreading), each process will handle around 4 tabs. So switching back and forth between tabs actually means switching back and forth between processes.
If the group of tabs wasn't active for a while your operating system might have swapped parts of the process memory out. So switching to a different tab will become pretty laggy, as the disk needs to provide the memory for the tab again.
Forcing Firefox to use less processes, uses a lot less memory, as Firefox won't run 8 renderers next to eachother and not using less protection features, will also lighten up the work Firefox needs to do, as memory isn't so strictly isolated between tabs.
This allows Firefox to use more memory to actually cache web objects in memory, which is forced by setting a fixed size for the cache in memory, to avoid Firefox purging objects unnecessarily to disk, keeping things snappy.
It's worth mentioning here that if Firefox is swapping in process memory this actually blocks CPU cycles until completed. So it takes away possible CPU power while lagging. So the CPU will just wait until the data arrived from disk instead of doing something else.
So yes, if you would benchmark just rendering performance I'm sure you can see that Firefox with those tweaks might be a bit slower.
But as rendering is only a small part of what is taking time on loading a website I doubt there's much real world impact, as requesting small objects from the network rather than disk is taking probably ten times longer.
Bottom line is, I'm aiming for a snappy performance for a system with a moderate to high load with many tabs open and many add-ons installed, and those tweaks deliver this for me.
That's why I shared it.
Hope this helps making an educated decision for your use case.
Thanks for asking!