Closed Bug 407456 Opened 17 years ago Closed 17 years ago

Viewing GMail causes excessive CPU load (80%) when in active tab

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dave.dixon, Unassigned)

References

()

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2pre) Gecko/2007120704 Minefield/3.0b2pre
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2pre) Gecko/2007120704 Minefield/3.0b2pre

For the last 5 days or so, I have noticed that the nightly builds have been really slow when viewing GMail. On my cpu monitor, it shows on average >%50 each for both cores).

I have included a Profile Sample captured with Activity Monitor of Minefield, while this is going on.

It happens every time, with all add-ons disabled

Reproducible: Always

Steps to Reproduce:
1. Sign in to gmail


Actual Results:  
CPU usage spikes past 50% on both cores

Expected Results:  
normal cpu usage
.txt dump of activity monitor cpu sample
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O 10.4; en-US; rv:1.9b1) Gecko/2007120816 Minefield/3.0b1

I don't really notice much of a slowdown, but I did see my cpu spike over 80% when loading Gmail. I'd be curious to see what the spike used to be. 
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2) Gecko/2007121014 Firefox/3.0b2

I'm writing in order to confirm the initial description of this bug report because I've been having the same experience. Though I'm reporting it against Firefox 3.0b2-candidates/rc1, I had the same problems with the nightlies prior to it as well.

As Dave Dixon has reported, the excessive CPU utilization and the noticeable slowdown appear when Gmail is in the active tab and it's always reproducible. It's there not only while Gmail is loading but afterwards as well as long as Gmail is in the active tab. Switching to another application or invoking "Hide Firefox" while Gmail is in the active tab of Firefox doesn't change the CPU utilization. If another tab is made active (e.g. Google Reader, IMDb), the CPU load drops but it rises again to the said excessive values as soon as one makes the Gmail tab active again.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

In order to write this comment, I tested Firefox 2.0.0.11 and it doesn't seem to have the described problem i.e. Gmail in Firefox 2.0.0.11 presents low CPU load regardless of its tab being active or inactive.
I have definitely seen improvements with the latest nightly builds, but the problem is still there.
The current nightly build: (Minefield 2.0b3pre 2007121304) the cpu hovers around %30 usage on both cores.
Same problem as described in Comment 3 here, using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b3pre) Gecko/2007121904 Minefield/3.0b3pre.
I should add that I see firefox-bin CPU usage at ~40% and a process called WindowServ with CPU usage at ~17%.  The CPU usage of both processes decreases when I switch tabs.
I can confirm that the behaviour in Comment 6 is exactly as described - when I switch to the Gmail tab, CPU usage for FF goes to 55-65% and WindowServer goes to about 15%.

This behaviour does not occur in Safari and I don't recall it happening in FF2.x. Additionally, I have FF3.0b2 on my Windows XP machine and it does not replicate the above symptoms.

Using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b2) Gecko/2007121014 Firefox/3.0b2
I am seeing the exact same problem. Have attached a sample from the activity monitor when Firefox is in an about:blank active tab.

Also when Firefox is in the Gmail active tab: 
http://vish.in/temp/firefox_sample_gmail.txt

Just the filesize (584K) should mean that FF is trying to do a _lot_.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b3pre) Gecko/2007122004 Minefield/3.0b3pre

I tried running a CPU Sampler from inside Instruments on firefox-bin with Gmail open in the first tab and focused and about:blank in the second tab (and unfocused, of course, since the first tab is focused) for 60 sec with samples being taken every 10ms. The CPU load is excessive as I confirmed in comment #3.

I noticed that the Symbol Flash_EnforceLocalSecurity from Library "Flash Player" was taking a "Total %" of 17.9 and this number was reported also as "Self %". Since I'd never used Instruments before, I just went in Tools > Add-ons of Minefield, disabled the plugin "Shockwave Flash" (I know it's used to play the sounds when new messages arrive) and restarted Minefield.

Now the CPU load seems low and the same to me (in the Activity Monitor utility and in the CPU Sampler of Instruments) in the following two scenarios:
1. Shockwave Flash disabled, Gmail loaded in the first tab and focused and about:blank loaded in the second tab
2. Shockwave Flash enabled, Gmail loaded in the first tab but not focused and about:blank loaded in the second tab and focused.

Please excuse me if the information isn't of any help, I just decided to share it in case it was actually of use.
In relation to comment #10, I'd like to add that I was using Shockwave Flash 9r115.

After writing the said comment, I decided to uninstall Shockwave Flash from my system using Adobe's official uninstaller and install the previous version which I think for Mac OS X is 9r47. Using the latter, I think Gmail in the active tab uses relatively as much as Gmain in an inactive tab and the CPU load is low.
Looks like this issue has been fixed in bug 409337. 
Josh, comment #11 makes it sound like this is indeed drawingmodel related.

Fixed, or at least worked around, by bug 409337.

This bug could have received more attention if it had been nominated blocking-firefox3?. Also, based on comments 10-11, it could have been assigned to Core:Plugins. Core bugs will usually get more attention than Firefox bugs, when applicable.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Depends on: 409337
In which firefox release and build is this bug fixed ?
I'm running Firefox 3:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0

and I still encounter this issue.
That might be an issue with the PPC build then. I am on an Intel Mac with no issues.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: