Page 1 of 2

Optimizing Firefox (gecko) Engine

Posted: Thu Mar 28, 2013 10:55 am
by Climhazard
Hello,

I wanted to share all optimizations/tweaks i am currently using with Firefox renderer, which made firefox noticably faster than default setting for me. This is a list of all known tweaks i have gathered and stored so far, hope it will help another users too :)


Before you begin, backup folder "Avant\Profiles\.default\" just in case something bad happens

Type about:config in the address bar and press enter, click "Ill be carefull i promise!" when prompted.

In case you forgot which value was in the column and want to revert it to default, right click the item and click "Reset".

Type these option names in search and change their values to:

=== Main optimizations ===

geo.enabled = false - disables geolocation
browser.safebrowsing.enabled = false - disable for checking fraud and malware for every site
browser.safebrowsing.malware.enabled = false - disable for checking fraud and malware for every site
network.http.pipelining = true - enables pipelining (speedup)
network.http.proxy.pipelining = true - enables proxy pipelining (speedup)
security.dialog_enable_delay = 0 - disables delay time when installing addons
image.animation_mode = none - disables animated images (leave it if you want gifs to play)
browser.tabs.animate = false - disables interface animations
browser.display.show_image_placeholders = false - turn off placeholders for unloaded images
extensions.blocklist.enabled = false - to disable annoying notification about outdated plugins completely
plugins.click_to_play = true - enables click to play for videos (leave it if you want autoplay)

To disable plugin-container.exe from running when playing flash videos do these steps (for windows 7):
Right click on My computer -> Properties -> Advanced system settings -> Environment Variables -> New... (System variables list) -> For variable name type: MOZ_DISABLE_OOP_PLUGINS, For variable value type: 1


=== Further optimizations ===

Make a new integer value (to do this right click on a blank space and click: New -> Integer) name it nglayout.initialpaint.delay and press OK.
Set its value to 0 and click OK.

create a Boolean value (to do this right click on a blank space and click: New -> Boolean) name it network.http.pipelining.firstrequest and click OK.
Set its value to True.

Make another Boolean value named config.trim_on_minimize and set its value to True. This will lower firefox memory usage when its minimized. Probably wont work in avant.

Make an integer value (go to about:config screen, right click on a blank space and select: new -> Integer) then name it browser.cache.memory.capacity depending on your system RAM set it to:
256 MB - 10240
512 MB - 14336
1 GB - 18432
2 GB - 24576
4 GB - 30720
8 GB and up - 32768


Make an integer value (go to about:config screen, right click on a blank space and select: new -> Integer) then name it content.notify.interval and set its value to 750000.

Make an Boolean value (go to about:config screen, right click on a blank space and select: new -> Boolean) then name it content.notify.ontimer and set its value to True.


Add new integer value name it Network.http.max-connections-per-server

Now if you have internet speed of:

GPRS, set:
Network.http.max-connections-per-server = 2
network.http.max-connections = 4


Internet 256 kbps, set:
Network.http.max-connections-per-server = 8
network.http.max-connections = 64


Internet 512 kbps, set:
Network.http.max-connections-per-server = 16
network.http.max-connections = 64


Internet 1Mb, set:
Network.http.max-connections-per-server = 20
network.http.max-connections = 128


Internet 2Mb and faster, set:
Network.http.max-connections-per-server = 32 - if really fast/stable connection try 64 otherwise lower to 20
network.http.max-connections = 256 - This is Firefox 19 default

If your ISP doesnt support IPv6 or dont need it disable it for minor speedup:
network.dns.disableIPv6 = true

----- Test preferences (if not exist, add them) ------
content.notify.backoffcount = 5
browser.tabs.loadDivertedInBackground = true - possible fix for focus problem in avant
content.interrupt.parsing = true
content.max.tokenizing.time = 2250000
content.maxtextrun = 8000
network.http.max-persistent-connections-per-server = 8
content.switch.threshold = 750000
------------------------------------------------------


Usefull addons:
Adblock and Noscript - Addons for blocking ads and java script blocking will give major speedup in page loading.
Memory Fox - This is a good addon for memory optimization which can save you some RAM
Magic actions for Youtube - Nice addon for customizing YT layout.

After changing everything restart the browser.

Any changes made using the About:Config method are stored in the Prefs.js file in your Profile folder (profiles\.default\gecko\Mozilla\Avant\Profiles\xxxxxxxxx.default), so you can back it up for later use.

You can find the description for every preference listed here at: http://www.tweakguides.com/Firefox_10.html

I have just combined various recommended values from different sites and tweaked them a little.

If you have any suggestion or extra tweak post them and ill update the list. :)

Re: Optimizing Firefox (gecko) Engine

Posted: Thu Mar 28, 2013 8:21 pm
by mbrazil
Thanks very much, Climhazard! :thumbup: :clap:

I was aware of some of these, but not all of them, and I'd been planning to create my own list so that I wouldn't have to go looking for them every time they need to be redone. This is very helpful.

There is one you might add that sulpherdragon posted the other day. It's at http://forum.avantbrowser.com/viewtopic ... re#p190663.

Re: Optimizing Firefox (gecko) Engine

Posted: Fri Mar 29, 2013 12:31 pm
by Climhazard
mbrazil wrote:Thanks very much, Climhazard! :thumbup: :clap:

I was aware of some of these, but not all of them, and I'd been planning to create my own list so that I wouldn't have to go looking for them every time they need to be redone. This is very helpful.

There is one you might add that sulpherdragon posted the other day. It's at http://forum.avantbrowser.com/viewtopic ... re#p190663.
Yes that is useful tweak sulpherdragon posted, though i was lucky i never had stuttering from browser session save interval even if it was on 15000 (15s) default, and forgot to add it. I would add it to the list posted so all tweaks are in one place, unfortunately it seems i can't edit the main post :(

There are a lot of options to play with in about:config and as i discover some good tweaks i will add them to my .txt file i saved so if i get new useful stuff i will upload the txt or maybe prefs.js file so users don't need to edit all manually. Only bad side when overwriting prefs.js is that you need to reinstall some addons, because they add their own settings in there. Maybe there's some workaround will see when i have time. I'm not really sure if there is a lot of Avant users like us who use mainly FF rendering engine :D

Re: Optimizing Firefox (gecko) Engine

Posted: Fri Mar 29, 2013 7:28 pm
by mbrazil
Climhazard wrote:I would add it to the list posted so all tweaks are in one place, unfortunately it seems i can't edit the main post :(
Yes, there's a timer in the forum software that won't allow edits after a certain period of time.
Climhazard wrote:There are a lot of options to play with in about:config and as i discover some good tweaks i will add them to my .txt file i saved so if i get new useful stuff i will upload the txt or maybe prefs.js file so users don't need to edit all manually. Only bad side when overwriting prefs.js is that you need to reinstall some addons, because they add their own settings in there. Maybe there's some workaround will see when i have time. I'm not really sure if there is a lot of Avant users like us who use mainly FF rendering engine :D
Maybe you should post occasional updates to this thread describing new additions to the list, and then repost the entire list with the additions included every once in awhile.

Re: Optimizing Firefox (gecko) Engine

Posted: Sat Mar 30, 2013 1:51 am
by Tinman57
Excellent! YouDaMan!

Re: Optimizing Firefox (gecko) Engine

Posted: Sat Mar 30, 2013 11:06 am
by sulpherdragon
Really cool post!
Unfortunately my fix didnt totally eliminate my stuttering so my theory must be wrong.
I will try these settings out soon :)

Re: Optimizing Firefox (gecko) Engine

Posted: Sat Mar 30, 2013 10:09 pm
by Climhazard
Thanks for replies :)

One mistake in main post. All js variables are case sensitive so Network.http.max-connections-per-server is not same as network.http.max-connections-per-server. Use only lowercase letters.

I am still testing the results of these tweaks when i have time, since all tweaks were taken from various versions of Firefox (FF 3, 7, 14, 16 etc.) and we can't be sure if they will have same effect in FF 19. I took a few tests on page loading speed with and without the tweaks. The results were in tweaked FF favor but can't be certain yet since im testing on not so stable wireless connection (connection speed is 10Mb/s, but not 100% signal quality). Also note that every tweak has different result on different PCs and internet connection speeds. These are results i took from webwait.com on random heavy and light sites:

FF Original (up) vs Optimized (down)
fforiginalvsoptimized.jpg
Second try, after clearing history/data in both avant and ff options
fforiginalvsoptimized2.jpg
Feel free to post your results or experiences while surfing, so we see if the tweaks are speeding us up or slowing down. I will test them on slow connection in the next few days.

Re: Optimizing Firefox (gecko) Engine

Posted: Sun Mar 31, 2013 9:22 pm
by Tinman57
Climhazard wrote:Thanks for replies :)

One mistake in main post. All js variables are case sensitive so Network.http.max-connections-per-server is not same as network.http.max-connections-per-server. Use only lowercase letters.
And there's no way to delete a key in Firefox that I can find..... :(

Re: Optimizing Firefox (gecko) Engine

Posted: Mon Apr 01, 2013 1:07 am
by Climhazard
Tinman57 wrote:
And there's no way to delete a key in Firefox that I can find..... :(
Find Prefs.js file in your Profile folder (profiles\.default\gecko\Mozilla\Avant\Profiles\xxxxxxxxx.default)
Right click -> Edit
Find the line containing variable you want to remove, in this case you probably want this line:

user_pref("Network.http.max-connections-per-server", number);

Make sure you closed the browser so it doesn't restore itself, and just delete that line and save.

Re: Optimizing Firefox (gecko) Engine

Posted: Mon Apr 01, 2013 8:35 pm
by Tinman57
Climhazard wrote:
Tinman57 wrote:
And there's no way to delete a key in Firefox that I can find..... :(
Find Prefs.js file in your Profile folder (profiles\.default\gecko\Mozilla\Avant\Profiles\xxxxxxxxx.default)
Right click -> Edit
Find the line containing variable you want to remove, in this case you probably want this line:

user_pref("Network.http.max-connections-per-server", number);

Make sure you closed the browser so it doesn't restore itself, and just delete that line and save.
Yep, that worked. Thanx :D

Re: Optimizing Firefox (gecko) Engine

Posted: Wed Apr 17, 2013 4:42 pm
by Climhazard
===========
Update #1
===========


Additional useful tweaks. Variables marked with "***" don't exist by default and needs to be created manualy. If any other not exist in about:config by default, create them just like it is described in the first post.

browser.frames.enabled = false - disables inline frames (usually iframes are used by ads only, and will make pages load faster, but some webpages might display some other content in them. Breaks auto-loading of new addons page from about:addons, so it will save your bandwidth when you want to manage addons. Search bar for addons is still working. However if you see a lot of situations where needed page content wont load, change this back to true.

browser.download.manager.scanWhenDone = false - disable annoying virus scan for every downloaded file when download finishes

browser.chrome.image_icons.max_size = 0 - disable image thumbnails - This is probably for the actual FF interface so i dont think there will be any difference by changing this, but i still listed it.

browser.link.open_newwindow.restriction = 0 - disable popup javascript windows (usualy opened by clicking on hidden ads) - needs testing

browser.overlink-delay = 0 - disables delay to show link text (in lower left corner) when hovering over hyperlinks

*** browser.sessionstore.max_concurrent_tabs = 0 - Loads only active tab in the memory, lowering memory usage.

*** network.dnsCacheEntries = 20+ - (default is 20, increase if you visit more than 20 sites regularly before clearing history/data)

*** network.dnsCacheExpiration = 240 - (default is 60, it manages how long will Firefox keep DNS entries cached before it discards them)

network.http.pipelining.maxrequests = 8

plugins.hide_infobar_for_missing_plugin = true - (Hides notification about missing plugins. This is only if you dont want to install any more plugins than you already have. If you want firefox to notify you about any missing plugin leave this at false, as it will probably cause confusion why certain content isn't playing on a page)

browser.link.open_newwindow = 1 - Some web sites choose to open certain links in new windows or new tabs on left click. This preference lets you control where to open these links, that would normally open new windows (1 - Open links, that would normally open in a new window, in the current tab/window, 2 - Open links in a new window, 3 - Open links in a new tab in the current window)

alerts.totalOpenTime = 8000 - (default is 4000 or 4s) - Change this to your liking, 1000 = 1s. This option changes the duration for alerts to be shown (All downloads complete for example).


Additional notes:

To speed up starting of firefox engine press Ctrl + B while focus is on any firefox tab, it will open default FF bookmarks manager. Delete everything in there for little faster startup since you dont need it when using avant bookmarks.

If you have issues with FF reporting "Site Certificate Is Untrusted" on many known safe sites, or just adding exception for specific site doesn't work, delete cert8.db file in profile directory (profiles\.default\gecko\Mozilla\Avant\Profiles\xxxxxxxxx.default) and check your system date/time clock setting, there might be real time and system time mismatch.

Please report if any of these do not work or cause any other issues. Thanks :)

Re: Optimizing Firefox (gecko) Engine

Posted: Sat Apr 27, 2013 1:46 am
by MysteryFCM
I'd strongly recommend keeping these enabled;

browser.safebrowsing.enabled = false - disable for checking fraud and malware for every site
browser.safebrowsing.malware.enabled = false - disable for checking fraud and malware for every site

Re: Optimizing Firefox (gecko) Engine

Posted: Sat Jun 01, 2013 4:30 am
by ICE2K
ImageHMMM I HAVE MOST OF THESE ALREADY BUT I'LL TRY OUT AFEW OTHERS.....

Re: Optimizing Firefox (gecko) Engine

Posted: Sun Aug 04, 2013 11:36 pm
by Tinman57
I have noticed that since MS's last update that anytime I clicked on a url, or opened a web page, or if the system made any contact with the internet, that one of the SVCHost.exe's running in the background would take up anywhere from 80 to 97% of my CPU for about 10 to 15 seconds (Thanks to Process Explorer). This of course slowed my system to a crawl and took forever for a web page to finally load.
I finally started investigating and this is what I found. The offending SVCHost.exe was singly loading the DNSClient (DNSRSLVR.dll) under the Network service, and nothing else. Now I knew the DNS Client had to happen in order to use the DNS on the internet. I got to looking at some of the other SVCHost running and found that among a lot of other services it was running, the DNS Client was also running under the local service. That's when it hit me, two DNS clients running at the same time on two different services, one would have to compete with the other at the same time, and the one only running a single program was the loser, eating up massive CPU cycles.
I Killed the SVCHost.exe that was running the single program, DNSClient. Then I opened up a web page, it came up INSTANTLY! No waiting for up to 15 seconds and no CPU cycles eaten, just instant page loads. And everything else that depends on the DNS client, all updater's or anything that needs access to the internet also worked very fast without a bunch of CPU cycles being eaten. And in Avant, no more having to stop and restart the loading of pages!
Now there's only one thing left for me to do, and that's find the culprit that's opening this occurrence of the DNS Client and make it stop doing that. But right now, that's for another day. I'll update this as I find out more...

Re: Optimizing Firefox (gecko) Engine

Posted: Mon Aug 05, 2013 10:09 am
by MysteryFCM
Disabling the DNS Client is the best way of dealing with it.

Start > Run, type: services.msc

Locate DNS Client and right click, then select Properties

Click Stop, and set its Startup Type dropdown to "Disabled"

Click Apply > OK

Re: Optimizing Firefox (gecko) Engine

Posted: Mon Aug 05, 2013 12:50 pm
by Climhazard
This could usually happen if you have modified hosts file, which has many entries and large size (200+KB). As MysteryFCM said, it is recommended to keep DNSClient service stopped and disabled, and should fix all problems related to it.

Re: Optimizing Firefox (gecko) Engine

Posted: Mon Aug 05, 2013 7:48 pm
by Crazy_John
Climhazard wrote:This could usually happen if you have modified hosts file, which has many entries and large size (200+KB). As MysteryFCM said, it is recommended to keep DNSClient service stopped and disabled, and should fix all problems related to it.
Thats why i try to have all the services i can (the ones that i dont need) disabled or in manual .
For example , right now i have only 14 services running (8 automatic + 6 manual) , the rest of the services "half" are disabled and the other half are in manual just in case the windows need them .
Theres no unneeded services using cpu>>>ram>>.... , the pc runs much better .

Re: Optimizing Firefox (gecko) Engine

Posted: Tue Aug 06, 2013 1:06 am
by Tinman57
MysteryFCM wrote:Disabling the DNS Client is the best way of dealing with it.

Start > Run, type: services.msc

Locate DNS Client and right click, then select Properties

Click Stop, and set its Startup Type dropdown to "Disabled"

Click Apply > OK
I'm already ahead of you, I didn't disable it, changed it to manual. Either way, my puter boots up faster and without the extra DNS server.

And on another note, HOW DID THIS POST WIND UP IN HERE? I don't think I screwed up, thought I put it in under a new Topic, not the Optimize Firefox Engine forum..... This is like waaaaay off topic.....

Re: Optimizing Firefox (gecko) Engine

Posted: Tue Aug 06, 2013 1:14 am
by MysteryFCM
No idea as to how it ended up in this topic I'm afraid.

Re: Optimizing Firefox (gecko) Engine

Posted: Tue Aug 06, 2013 1:16 am
by Tinman57
Crazy_John wrote:
Climhazard wrote:This could usually happen if you have modified hosts file, which has many entries and large size (200+KB). As MysteryFCM said, it is recommended to keep DNSClient service stopped and disabled, and should fix all problems related to it.
Thats why i try to have all the services i can (the ones that i dont need) disabled or in manual .
For example , right now i have only 14 services running (8 automatic + 6 manual) , the rest of the services "half" are disabled and the other half are in manual just in case the windows need them .
Theres no unneeded services using cpu>>>ram>>.... , the pc runs much better .
Oh I'm a stickler for not having useless services running. One of my optimizer programs (Fixit Utilities 10) has a services optimizer that list all of my services and tells me which ones I can stop and which ones I absolutely need, although it did tell me to disable one that the system and a few apps needed to work correctly, so I changed it to manual.....