Tuesday, January 8, 2008

How to Stop Firefox from Consuming Your Cpu Cycles

Firefox, even up to version 1.5, has a nasty habit of soaking up all the available CPU and memory of your system. Here is the fix.
Steps

1. Open Firefox.

2. Type 'about:config' into the address line and hit Go or return. This takes you into the Firefox expert config menu.

3. See if there is an entry called browser.cache.disk.capacity.
* Yes? then modify the value to 16384, close Firefox and restart Firefox. It's fixed.
* No? right click somewhere on the about:config page and select Integer. Create an Integer entry called 'browser.cache.memory.capacity' and set it to 16384. Close Firefox and restart Firefox.It's fixed.

4. Check the CPU and memory size by ctrl-alt-delete and select the Performance tab... look for the firefox.exe process and the CPU for Firefox should now stay nominally under 10%.


Tips

* This process also works for flock, since it's based on Mozilla engine, same as Firefox.
* Firefox version 1.5 should have the browser.cache entry already, but default value is like 65K and apparently that causes the memory leak bug which plagues FF since ver 1.0
* If you still have problems, then the last resort is to Disable Javascript... go to Tools, Content, and clear the Enable Javascript box. This seems to always settle the issue, but then many sites won't function optimally, including gmail.com.


Warnings

* Be careful in the about:config window

5 comments:

Anonymous said...

.Type "about:config" into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set "network.http.pipelining" to "true"

Set "network.http.proxy.pipelining" to "true"

Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it "nglayout.initialpaint.delay" and set its value to "0". This value is the amount of time the browser waits before it acts on information it receives.

Anonymous said...

Firefox caps out at 8 pipelined requests, which is the max allowed by the HTTP spec. By default, it does 4 pipelined requests.

Furthermore, if you could do 30 pipelined requests we'd have sites with a high population of FF users being brought to their knees pretty quickly. Some sites will even block your IP if you try to pull a stunt like that.

B said...

Maybe I need to disable the anonymous comments

anon1 < yes I have seen those tweaks before. Thank you for posting them.For such tweaks I rely on the FF addon 'FasterFox'.I think it takes care of those tweaks on its own. I don't really like to mess about with about:config much on my own, me being a girl and all.

anon2> I just tried the 30 pipelined requests setting.I have to say it hasn't made any visible difference to FF speed, but it hasn't done any harm either. But I am very unwilling to get my IP banned, so to be on the safer side , I'll revert back to my original settings.
Curiously enough I got a 302(redirection limit exceeded) twice on this setting.I wonder if it has anything to do with it

Anonymous said...

302 is a valid method of reporting that a page has been temporarily redirected to another site. most of the companies use http 302 redirect to bounce all traffic from "abc.com" to "www.abc.com". you wont face this problem with IE.

Anonymous said...

302 Hijacking, possibly removes your site from google index. 302 redirect hijacking, which used a temporary redirect server message or the META refresh attribute with the to-be-hijacked page as its target, it has been an issue for ears, even if it occurred in very low numbers, the possibility of this exploit had to be dealt with. And as so, with the help of the webmaster community, constant reports and data analysis, this vulnerability in Google has been fixed.