Firefox Tuning

Discussion of features in Mozilla Firefox
Locked
Chrysalis
Posts: 319
Joined: January 27th, 2004, 10:43 am

Post by Chrysalis »

yeah I agree, its a great resource.
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

I think we should be taking some of the results of this thread and debating on changing the default values to be the best possible for everyone, however obviously there are settings which are connection or computer speed dependent.
philetus
Posts: 8
Joined: January 30th, 2004, 10:43 pm

user.js

Post by philetus »

Do I understand, in 0.8, until you add the user.js folder and put in user files, you won't get anything with
about:config?
User avatar
Moonwolf
Posts: 531
Joined: December 7th, 2003, 2:50 pm
Location: Hertfordshire, England
Contact:

Post by Moonwolf »

about:config makes changes to prefs.js, not user.js, so it should always work.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Thunderbird 1.0 (20041206)
EMbuttons: Buttons & options for the Extension Manager. Easy Get Mail Button is here too.
User avatar
MonkeeSage
Posts: 1011
Joined: December 20th, 2002, 8:15 pm

Post by MonkeeSage »

If I'm not mistaken, about:config only shows registered prefs, it doesn't grok any of the pref files, so most of these prefs will only show up if they have user set values, because by default they are not in the pref registry, they are hardcoded.

I've not looked real recently, so I may be remembering incorectly, but that is what I seem to recall. I'm also far from a JS or XUL guru, so I could have been reading things wrong last I did look. If things haven't changed the source is in toolkit/global/config.xul | .js


Shelumi`El
Jordan

S.D.G
User avatar
laszlo
Posts: 5225
Joined: November 4th, 2002, 6:13 pm
Location: .de
Contact:

Post by laszlo »

That's correct, many of the prefs we talk about here are not in the prefs tree by default, so they initially don't show up in about:config. Once added per user.js or about:config they're written to pref.js on exit and are then available (until deleted from prefs.js and user.js).
"I'll be dead after I die. I was dead before I was born. Life is a break from death." - Hlynur, 101 Reykjavík
trooper21
Posts: 206
Joined: October 5th, 2003, 8:12 am

Post by trooper21 »

MonkeeSage wrote:Nice tips (and documentation)! :)

Here are a few that are not so much for speed, as for general network proformance:

-

network.dnsCacheExpiration: seconds
network.dnsCacheEntries: integer
nsDNSService2.cpp

-

network.ftp.idleConnectionTimeout: seconds
default: 5 minutes (5 * 60)
nsFtpProtocolHandler.cpp

-

network.http.keep-alive.timeout: seconds
network.http.request.max-start-delay: seconds
network.http.connect.timeout: seconds
nsHttpHandler.cpp

-

So, for example:

Code: Select all

user_pref("network.dnsCacheExpiration", 360); // 6 minutes
user_pref("network.dnsCacheEntries", 100);
user_pref("network.ftp.idleConnectionTimeout", 60); // 1 minute
user_pref("network.http.keep-alive.timeout", 30);
user_pref("network.http.request.max-start-delay", 5);
user_pref("network.http.connect.timeout", 30);



Shelumi`El
Jordan

S.D.G


wat does the dns entries do? can briefly explain
User avatar
MonkeeSage
Posts: 1011
Joined: December 20th, 2002, 8:15 pm

Post by MonkeeSage »

network.dnsCacheExpiration - time in seconds before an entry in the DNS resolver cache grows stale and is removed.

When you send a request to, e.g., MozillaZine, Gecko has to resolve the hontname form of the address (i.e., xxxxxx.tld) into the IP form (i.e., xxx.xxx.xxx.xxx). When it does this, there is an option to remember (cache) the entry for a certain period of time so that subsequent requests to the same hostname don't have to contact the name server and do the resolution again. Entries in the DNS cache are said to be 'fresh' when they are usable and 'stale' when they need to be removed and a new resolution needs to be proformed. This setting allows you to control the default fresh / stale interval.


network.dnsCacheEntries - number of entries allowed in the DNS cache before new entries start pushing old ones off the back. I.e., if you have 20 entries allowed, and you do the 21st, then slot 20 is now 21 and whichever entry is at the end of the cache goes bye-bye. So in comes resolution 21, out goes resolution 1. 21 -> [20, 19, 18...3, 2] -> 1.

Does that make sense?



Shelumi`El
Jordan

S.D.G
Chrysalis
Posts: 319
Joined: January 27th, 2004, 10:43 am

Post by Chrysalis »

I just increased from 3600 (1 hour) to 86400

rarely do www ip addresses change.

I love this tweak
User avatar
BenBasson
Moderator
Posts: 13671
Joined: February 13th, 2004, 5:49 am
Location: London, UK
Contact:

Post by BenBasson »

I just increased from 3600 (1 hour) to 86400
rarely do www ip addresses change.

Maybe so, but did it make any difference?
trooper21
Posts: 206
Joined: October 5th, 2003, 8:12 am

Post by trooper21 »

MonkeeSage wrote:network.dnsCacheExpiration - time in seconds before an entry in the DNS resolver cache grows stale and is removed.

When you send a request to, e.g., MozillaZine, Gecko has to resolve the hontname form of the address (i.e., xxxxxx.tld) into the IP form (i.e., xxx.xxx.xxx.xxx). When it does this, there is an option to remember (cache) the entry for a certain period of time so that subsequent requests to the same hostname don't have to contact the name server and do the resolution again. Entries in the DNS cache are said to be 'fresh' when they are usable and 'stale' when they need to be removed and a new resolution needs to be proformed. This setting allows you to control the default fresh / stale interval.


network.dnsCacheEntries - number of entries allowed in the DNS cache before new entries start pushing old ones off the back. I.e., if you have 20 entries allowed, and you do the 21st, then slot 20 is now 21 and whichever entry is at the end of the cache goes bye-bye. So in comes resolution 21, out goes resolution 1. 21 -> [20, 19, 18...3, 2] -> 1.

Does that make sense?



Shelumi`El
Jordan

S.D.G

thx for the explanation
Karl
Posts: 387
Joined: March 19th, 2003, 12:05 pm

Post by Karl »

I guess I am just ignorant, but having read thru the above thread, I still don't understand how to create a user.js file and where to put it. All I see in there is prefs.js. Thanks. Karl
User avatar
PhoenixNostalgia
Posts: 562
Joined: September 27th, 2003, 10:13 pm

Post by PhoenixNostalgia »

Karl wrote:I guess I am just ignorant, but having read thru the above thread, I still don't understand how to create a user.js file and where to put it. All I see in there is prefs.js. Thanks. Karl


You have to make it yourself. Make a txt file from scratch, input the values you want in it, save and rename to "user.js" and voila!
User avatar
Moonwolf
Posts: 531
Joined: December 7th, 2003, 2:50 pm
Location: Hertfordshire, England
Contact:

Post by Moonwolf »

Cusser wrote:
I just increased from 3600 (1 hour) to 86400
rarely do www ip addresses change.

Maybe so, but did it make any difference?

It does if you're on dialup and your ISP's DNS server seems to take a rest at regular intervals, like mine!
It also removes the annoyance of constantly seeing "Looking up..." on the status bar when you're going to a page on the same site you've been browsing for the last half hour.
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1
Thunderbird 1.0 (20041206)
EMbuttons: Buttons & options for the Extension Manager. Easy Get Mail Button is here too.
Zeron
Posts: 1067
Joined: March 6th, 2003, 3:33 pm
Contact:

Post by Zeron »

These work pretty well for me:

Code: Select all

// Try These Instead
user_pref("browser.cache.memory.capacity", 65536);
user_pref("browser.cache.disk_cache_ssl", true);
user_pref("browser.xul.error_pages.enabled", true);
user_pref("content.interrupt.parsing", true);
user_pref("content.max.tokenizing.time", 2250000);
user_pref("content.maxtextrun", 8191);
user_pref("content.notify.backoffcount", 5);
user_pref("content.notify.interval", 750000);
user_pref("content.notify.ontimer", true);
user_pref("content.switch.threshold", 750000);
user_pref("network.http.max-connections", 32);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 8);
user_pref("network.http.max-persistent-connections-per-server", 4);
user_pref("network.http.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 8);
user_pref("network.http.proxy.pipelining", true);
user_pref("nglayout.initialpaint.delay", 750);
user_pref("plugin.expose_full_path", true);
user_pref("signed.applets.codebase_principal_support", true);


Previously, I was using this:

Code: Select all

// Old (but working) settings
// Enable pipelining:
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 100);

//Set Maximum Connections Per Server
user_pref("network.http.max-connections", 24);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 4);
user_pref("network.http.max-persistent-connections-per-server", 2);

// This one makes a huge difference. Last value in milliseconds (default is 250)
user_pref("nglayout.initialpaint.delay", 0);

// Enable pipelining:
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 100);

// turn on timer-based reflow management
user_pref("content.notify.ontimer", true);

// sets the allowed time between reflows in microseconds
user_pref("content.notify.interval", 100);

// set the number of reflows to do before waiting for the rest of the
// page to arrive
user_pref("content.notify.backoffcount", 200);

// STOP REFERRER LOGGING - 02.05.03
// 0=don't send any, 1=send only on clicks, 2=send on image requests as well
// user_pref("network.http.sendRefererHeader", 0);

// Stop reusing active windows:
// user_pref("advanced.system.supportDDEExec", false);

//Set Maximum Connections Per Server
user_pref("network.http.max-connections", 24);
user_pref("network.http.max-connections-per-server", 8);
user_pref("network.http.max-persistent-connections-per-proxy", 4);
user_pref("network.http.max-persistent-connections-per-server", 2);

// End good settings


<b>Edit:</b> Removed my comment-out code from the previous settings. Just in case someone copied and pasted that verbatim, it wouldn't have worked before...
Last edited by Zeron on March 10th, 2004, 7:28 pm, edited 1 time in total.
Locked