Closed Bug 254884 Opened 21 years ago Closed 12 years ago

cpu usage on a idle firefox is very high compared to i.e. safari on the same machine [Mac]

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cjm, Unassigned)

References

Details

(Keywords: perf, qawanted)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 29642 firefox-bi 1.1% 0:07.26 12 197 302 15.0M 24.9M 39.5M 334M 29639 Safari 0.0% 0:03.33 7 111 248 5.30M 20.9M 26.2M 161M both browsers were started at the same time, in both browsers i loaded http://www.w3.org/ and left the window open. they both approx. used around 3.3 CPU seconds for bootup and then downloading+rendering the one html page. safari from then on used 0% CPU time. firefox uses ALL the time around 0.7 (min) to 3.0% (max) CPU time for being idle - it doesnt matter if i use the default theme or other themes... always the same result. (another problem is that firefox uses much more CPU as other browsers on the same machine ... even typing text into this bug-form needs 12-17% CPU !) Reproducible: Always Steps to Reproduce:
I heard in another bug, that this is caused by some kind of polling they have to perform, because they are using old Carbon code (MacOS 9 compatible) in some places, since Mozialla was also written for MacOS 9. Now since MacOS X is the only supported Mac platform, I think this could be changed, maybe by switching to Cocoa code where possible.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I can confirm this. Currently I have approximately ten tabs open, all with static conent (i.e., no Flash- gif-animations etc, it's java api docs) and it uses about 25% CPU (1GHz G4). Safari uses less than 1% (closer to 0% than 1%) under similar circumstances
This is definitely the most unnerving thing about firefox right now. When I have only 10 tabs open (all html sites, without animations), I often get 30-40% CPU usage, even when Firefox is hidden and therefore should be idle. It gets even worse, with Macromedia Flash Content. 1. Flash content plays a lot slower than in Safari. 2. Flash content often causes FF to hang completely (force quit is the only remedy) 3. If Flash conenent is loaded, but not doing anything, FF consumes even more CPU.
When I simply click and hold down the mouse button on a scrollbar of a longer page firefox starts to eat up all the available cpu power until i release the mouse button - I don't even need to scroll actually! If I try to do the same with other browsers (safari,opera,ie) then the cpu usage stays low. (This could happen during the watching of simple but long HTML pages.)
You can click and hold down the mouse button on any page and you get 100% cpu consumption. This certainly isn't a good sign.
The 'hold button down' thing has been fixed some time ago. There was another bug about that. But the situation is still far from ideal. Firefox is still using 30-50% CPU when idle (when it has been running for some times and has some (static) pages open). Bug 288472 seems to be about the same problem. The main problem with this CPU usage thing is that it drains the battery of my PowerBook :\
Summary: cpu usage on a idle firefox is very high compated to i.e. safari on the same machine → cpu usage on a idle firefox is very high compared to i.e. safari on the same machine
*** Bug 318383 has been marked as a duplicate of this bug. ***
I can also confirm this (1.5.0.3 on win32), even when I've closed all tabs and the browser is displaying nothing but one empty "(untitled)" tab. The cpu utilzation generally runs in excess of 50-60%, and sometimes ends after a few minutes, and sometimes not. Usually I end up having to closing/reopen firefox. I agree that this can be very annoying, particularly when it occurs at a time when closing/reopening is not convenient. This problem has been happening for the past couple minor revs.
(In reply to comment #8) I can report the same problem, Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3 on Win2000. I often leave FF running overnight (but without any pages open, e.g. with one blank tab) and the CPU utilization could be as high as 90% next morning. It also happens with regular use, although sometimes "goes away" by itself. I have no such issues with 1.5.0.3 on Linux though.
I am running FireFox 2.0.0.2 and am seeing 8% CPU usage for 7 open tabs with static pages, few pictures and no Ajax calls. When typing the usage goes up to 12% PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4129 andy 15 0 248m 129m 20m S 7 6.4 57:45.66 firefox-bin 3538 root 16 0 383m 105m 15m S 3 5.2 55:50.40 X This is on a Linux box: Dell Dimension 8400 3.4Ghz with 2Gb Ram running with hyper threading enabled and Fedora Core 6 RC and kernel 2.6.19-1.2911.fc6 #1 SMP This is not really something that bothers or annoys me since Linux is really good at multitasking. Still I would like this bug to be fixed too. Keep up the good work guys! Mozilla, FireFox, and Thunderbird are the best!
Assignee: bross2 → nobody
I have four tabs open: Gmail, Hotmail, an Apple support page, and this one. Firefox, at idle, is using 7 to 10% CPU. I'm sure that Gmail and Hotmail's ajax are doing some polling, but I don't expect it would happen with such a frequency to account for this level of CPU usage. The main reason this concerns me is that I'm using a notebook, and this eats battery. Firefox is VERY fast, but I think it should strive to be more miserly with its use of CPU time, especially for tabs and windows that are not visible. Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Firefox on MacOS X, with no documents open, uses a few percent CPU, which is odd. Open some documents (with no animated GIFs or flash or anything), and Firefox uses more CPU, but still pretty much under 10%. Add an idle flash app (like a youtube video that's paused), and the CPU usage spikes WAY up. That shouldn't happen. Another major culprit is the QuartzPDF plugin for viewing PDFs in a browser window. First of all, it's sad that Firefox doesn't have that built in. Secondly, that plugin uses an extra 10% of CPU for each document open (I've reported this bug, but they have ignored it). The problem here is clearly a problem with the plugin, because Safari uses no CPU for idle PDFs, nor do Preview or Adobe Reader. There seems to be a general lack of concern for being efficient and event-driven. So those of us who use notebooks and other battery-powered devices get kinda screwed. That being said, Firefox tends to have, by far, the smallest MEMORY footprint, and that's why I use it. Firefox still has some catching up to do with regard to process-per-domain, but the memory management is really really good.
Keywords: perf, qawanted
Summary: cpu usage on a idle firefox is very high compared to i.e. safari on the same machine → cpu usage on a idle firefox is very high compared to i.e. safari on the same machine [Mac]
Yes, this is still true with 4.0 beta 7. Sadly, this makes me use a browser other than Firefox on my Mac notebook because of the significant battery life hit associated with using Firefox compared to Safari or Google Chrome.
I'm using Firefox 9.0.1 on Mac OS X 10.5.8 and I'm experiencing the same problem. High CPU usage (around 30%) while even no web page is loaded in the browser. Safari in the same situation requires less then 2%.
This is probably related to Firefox keeping Macs from going to sleep when idle. (Regardless of the fact that they have erroneously marked that bug as fixed.)
I noticed that FF 10 was also using significant CPU, but after turning off all the extensions it is using < 1%, so I'd suggest you check for an evil extension.
I only have Ad Block installed. If I give the current nightly a moment to settle down, with the pages I have open, it's almost completely under the radar at 0.1%. That is an amazing improvement, and I congratulate the developers for having achieved this. In your position, I would pat myself on the back and move on to bigger bugs. However since none of my open pages have Javascript running, I don't understand why the CPU usage isn't completely zero. I think there is some polling going on, and that may be responsible for why, if I have the Nightly running, my Mac won't sleep if I leave it idle. (Quitting the Nightly fixes this.) It was completely inappropriate to close the Mac-won't-sleep bug.
(In reply to Timothy Miller from comment #17) > This is probably related to Firefox keeping Macs from going to sleep when > idle. (Regardless of the fact that they have erroneously marked that bug as > fixed.) Tim, do you have a bug number?
Firefox hangs at http://svn.wikimedia.org/doc/classUser.html on Mac OS/X but Safari not. It also hangs when resuming since many versions of Firefox now. But the test above is easy and is probably not related to the resume bug. Firefox hangs on whatever version of (just try to scroll down). Also the drawing of a Doxygen web is complex, Safari does it instantaneously. Firefox takes all the CPU (I mean about 35%) and you can't quit Firefox. The only way consists in forcing the exit (and loosing many things).
(In reply to nicolas.brouard from comment #21) > Firefox hangs at http://svn.wikimedia.org/doc/classUser.html on Mac OS/X but > Safari not. That's not the same bug at all: *this* bug is about firefox CPU use being high when firefox is idle, your report is most definitely not about firefox idling. I suggest you find another appropriate bug, or else report a new bug.
I have upgraded to Firefox 12.0 on Mac OSX 10.6.8 (Snow Leopard) on Intel Core 2 Duo 2.8 GHz with 4 GB of Ram and I continue to experience a high CPU usage by Firefox compared to Safari, when visiting the same Web pages in the same moment (so same content/services). In addition, Firefox 12.0 continues to use around 30-35% of CPU even when no web page is loaded.
I see this same issue: Firefox 13; Fedora 17; Gnome 3.4. All I have open in Firefox is the tab with this bug, even if I'm doing nothing the CPU usage is fluctuating between 2% and 4%.
I also see the same issue on Mac OS X 10.7.4 with firefox 13.0.1 with about:blank loaded I get 2.5% cpu usage after several minutes I would expect it to eventually go down to 0 because that is exactly what safari and chrome do even when i have several tabs open in them.
Some further investigation on my part: I disabled Firebug and the idle CPU usage dropped.
Rob thanks for the info, I've reproduced and reported the issue on firebug. http://code.google.com/p/fbug/issues/detail?id=5661 Maybe if people comment on that bug there will be some attention paid to it.
(In reply to andrew.luetgers from comment #27) > Rob thanks for the info, I've reproduced and reported the issue on firebug. > > http://code.google.com/p/fbug/issues/detail?id=5661 > > Maybe if people comment on that bug there will be some attention paid to it. I don't think we need to taint this very old bug as a firebug related. The early comments never mention firebug. Besides, there are plenty of other bugs covering firebug issues very well - [1] https://bugzilla.mozilla.org/buglist.cgi?list_id=4244850;field0-0-0=short_desc;bug_severity=blocker;bug_severity=critical;bug_severity=major;bug_severity=normal;short_desc=firebug;field0-0-1=keywords;type1-0-1=allwordssubstr;product=Core;product=Firefox;field1-0-1=short_desc;type1-0-0=substring;short_desc_type=allwordssubstr;type0-0-0=anywordssubstr;type0-0-1=substring;resolution=---;classification=Client%20Software;classification=Components;query_format=advanced;field1-0-0=short_desc Further, I think this was considered to be a Mac-only issue - is this correct? If none of the people in comments 0-10 still see this problem, or no one else can reproduce per their specifications and match their observations, then we should just close this out.
I second closing the issue. I did experience the issue on my Mac, but as I mentioned it went went away when I disabled ny plugins - I never bothered to track down the culprit. Firefox core can't be held accountable for rogue plugins.
When I first observed this, I was definitely not running any plugins. But that was a long time ago.
How about an experiment before closing the bug? I just restarted FF without any extensions and opened ten tabs with Facebook on. I then let it rest for five minutes. Now the CPU usage varies between 2 and 50% with a lot of readings around 20%.
(In reply to db from comment #31) > How about an experiment before closing the bug? I just restarted FF without > any extensions and opened ten tabs with Facebook on. I then let it rest for > five minutes. Now the CPU usage varies between 2 and 50% with a lot of > readings around 20%. thats probably the chat feature on Facebook (its running java-script all the time waiting on and checking to see if anyone msged you)if i had to guess
Attached image Screenshot
It work as expected for me using Mac OS 10.8.2 on Latest Nightly and FF 19b3. In the attached file you can see my Mac Configuration, CPU Usage and Nightly Build ID. Based on my verifications done I consider this issue fixed. In addition, Social API was enabled while testing this.
If anyone can still reproduce this issue using new profile or in safe mode please reopen this bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
I've been following this on the same Macbook pro (i7 core). Today with v25, CPU usage seems to have dramatically reduced. I'm pretty sure this is a recent development (in the last month). It is now idling on a gmail page at <5% CPU. On this same laptop, previously idle was >10% CPU. This is a real-world Firefox with lastpass,adblock, firebug and a few other add-ons. This is great news. Firefox is already more memory efficient than Chrome despite Firefox being 64 bit and Chrome 32 bit (on OS X); this makes Firefox's battery use a dead issue I think. Now I wonder if the same results are observed on archlinux...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: