15

Several times, I've noticed when I look at my computer in the morning, when it's been left on overnight, Firefox has high CPU usage (25% on this 4-core machine).

The first few times, I just restarted Firefox, and then it went back to low CPU usage (even though I've got it set to re-open all open tabs from before). After that happening several times, I tried closing tabs one-by-one, and found that it's the StackOverflow tab that was causing high CPU usage. After I've closed the tab, if I re-open it again then it is back to normal CPU usage. So it looks as though there's something about the SO page that causes high CPU usage after it's been open for a long time.

This is on Firefox 13 and 14, on Windows XP SP3, 32-bit. I haven't tried it with other browsers.

Update: I left both Firefox and Chrome on overnight with StackOverflow open. Chrome was fine. Firefox was again on high CPU usage. I found that just clicking reload for the SO page made the CPU usage go back down.

18
  • There seems to be no cpu tag or similar. Jul 18, 2012 at 23:51
  • Perhaps you can try leaving firefox on over night, with only on tab (a SO page, obviously) open and protocol how long it takes for the cpu-usage to go up. On linux, I'd propose something like this: while true; do sleep 10; ps aux | grep firefox >> ff.log; done, on windows, I've no idea.
    – bitmask
    Jul 19, 2012 at 0:03
  • 1
    I too have noticed this. But I have more than just SO open, so I never blamed SO.
    – Mysticial
    Jul 19, 2012 at 0:09
  • @Mysticial, maybe next time, try closing just the SO tab. Jul 19, 2012 at 0:18
  • Are the real time update working? Firefox used cause high CPU load when it couldn't establish a WebSocket connection (due to constant and excessive retrying). I'm not sure if that's still the case though. (CC: @Mystical)
    – Dennis
    Jul 19, 2012 at 1:20
  • I have many SO tabs up in FFox v.latest all the time (24/7) and have never noticed this. Are you running any addons?
    – slugster
    Jul 19, 2012 at 2:06
  • @slugster: Yes, I'm running a bunch of add-ons. DNSSD; English (Australian) dictionary; Firebug; Flashblock; IE Tab 2; Microsoft .NET Framework Assistant; Show Anchors 2; Xmarks Jul 19, 2012 at 2:29
  • @Dennis Yes, real-time updates work. Funny thing is that on my other computer, FF doesn't lag, but vote-updates don't work. (but the "new activity" updates do... go figure...) Do you need to be logged into see vote-updates?
    – Mysticial
    Jul 19, 2012 at 3:18
  • Well FWIW this never happens in chrome, so it sounds like a FireFox bug to me,
    – bobobobo
    Jul 19, 2012 at 3:34
  • @bitmask: Wouldn't this be better: while true; do sleep 10s; date +%H:%M:%s >> ff.log; ps aux | grep firefox | grep -v grep >> ff.log. Untested, though, as I don't have *nix here. Jul 19, 2012 at 11:56
  • @UristMcBobby: Yes sure, that'd work (except you forgot the done) too, but you can determine the time from the number of lines with high load. Anyhow, the OP runs windows, so they'd have to write some batch-script.
    – bitmask
    Jul 19, 2012 at 13:18
  • @bitmask: Yeah...somewhere while writing that I thought "That done is missing..." but forgot about that again. And I take the bold claim that this is not possible with pure Windows and CMD... Jul 19, 2012 at 13:59
  • (off-topic) @UristMcBobby Using grep [f]irefox saves you the extra grep.
    – Shawn Chin
    Jul 20, 2012 at 8:47
  • @ShawnChin: Now that's a neat trick, thanks! For everyone else who's wondering how that works, it's easy ones you realize that ps shows grep [f]irefox as processname, which is of course not matched by [f]irefox. Neat. Jul 20, 2012 at 8:55
  • To collect processor usage on WinXP easiest way is to use PerfMon to create a log of the total CPU time and current CPU % counters overnight (at whatever interval). With the addition of PowerShell (included from Win7): while ($true) { start-sleep 30; get-process 'firefox' | % { "$(get-date),$($_.WorkingSet),$($_.TotalProcessorTime)"} | out-file -append "data.csv" }. There are lots of other stats from Get-Process and even more from WMI that could be added.
    – Richard
    Jul 20, 2012 at 8:59

0

You must log in to answer this question.

Browse other questions tagged .