Closed Bug 434846 Opened 16 years ago Closed 15 years ago

CPU usage near 100% when loading/reloading a tab in the foreground.

Categories

(Firefox :: Tabbed Browser, defect)

3.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: justhinkin2, Unassigned)

Details

(Keywords: regression, Whiteboard: [closeme 2009-09-08])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008051206 Firefox/3.0 ID:2008051206

Firefox 3 RC1:

When two or more tabs are open and the browser is focused on a tab that's loading or reloading a page, a single core CPU will peg at 100%, slowing the loading or reloading of that tab to a crawl for up to 30 to 40 seconds. Switching to another already loaded tab while the other tab is still loading returns the CPU to a normal 5 to 10% usage.

Loading or reloading a single page in the browser does not cause this to happen nor does loading an additional tab in the background. CPU usage will not climb above 30 to 35% no matter how many tabs are loading in the background (within reason), only when the browser is focused on a loading tab when multiple tabs are open.

The above problem occurs whether in "Normal" mode or "Safe Mode" including having all plugins disabled including starting Firefox in a fresh profile.

Reproducible: Always

Steps to Reproduce:
1.Start Firefox 3 RC1 and let the home page finish loading.

2. Bring up Windows Task Manager and minimize (CPU graph will be in tray for monitoring purposes "SysInternals" "Process Explorer" is also good for monitoring purposes).

3. Launch a page (such as "Firefox Add-Ons") in a second tab and let it fully load in the background, monitoring CPU usage and time to load.

4. Once the second tab is done loading, switch to that second tab and "Refresh" keeping the browser focused on that second tab monitoring CPU usage and load time. CPU should quickly climb to near 100% and load time should increase significantly.

5. Once page is done reloading, Refresh once more and while the page is reloading again, switch to the other tab for a few seconds while monitoring CPU usage and then back to the still loading tab. CPU usage should show close to 100% while the browser is focused on the tab that's reloading a page then drop to 10% to 20% when that tab is switched to the background then climb once more to near 100% when switching back to it.
Actual Results:  
With two or more tabs are open, any tab that's loading or reloading in the background should load quickly with normal CPU usage (10% to 30% single core CPU depending on content).

If browser focus is on a tab that's loading, CPU usage quickly climbs to 100% and loading time slows significantly. If, while the aforementioned tab is still loading, focus is switched to another fully loaded tab, CPU usage will drop to "normal" (10% to 30% while background tab is still loading).

The above results are seen in Safe Mode also and when Firefox is started in a fresh, unpopulated, profile.

Viewing a single page or surfing pages in a single view in the browser does not cause this problem; CPU usage remains normal when loading pages. Invoking another page in a new window does not cause this problem to happen either.

Expected Results:  
Pages should load with what would be considered normal CPU usage (10% to 30% constant usage with the occasional spike depending on page content) in a multi-tab situation whether the tab that is loading a page is in the foreground or background. CPU should not peg and stay near or at 100%.

I have been testing this particular problem since the trunk builds of 20080512xx where I believe the last RC1 blocker was squashed and continued testing through to RC1 itself. I've eliminated extensions and plugins from the equation as having no effect on the outcome of the testing.

I've also disabled all caching via "about:config" and results remained the same.

Test system:

>Windows XP Pro SP3 (with hotfix that fixes SQL DB corruption in MS's Retail Management System installed)

>AMD 3200+ single core 32 bit processor (P4 3.0Ghz equivalent) w/ 1Gb memory

>Dedicated video card w/256 memory (XGI Tecnology)

>768k DSL on a wireless Westell router.

Extensions: (when not testing in Safe Mode)

Adblock Filterset.G Updater 0.3.1.3
Adblock Plus 0.7.5.4
Blog This in Windows Live Writer 1.0.1
ChatZilla 0.9.82.1
CuteMenus - Crystal SVG 1.9.2
FEBE 6.0b(20080512_152139)
Firebug 1.2.0a30X [DISABLED]
Flashblock 1.5.6
Nightly Tester Tools 2.0.2
One-Click Installer for WP 1.0
QuickJava 0.4.2.1
Undo Closed Tabs Button 3.0.2
Correction:

In first paragraph of above description; "Switching to another already loaded tab while the other tab is still loading returns the CPU to a normal 5 to 10% usage." should read "10% to 30% usage" not "5%to 10%".
Flags: blocking-firefox3?
Version: unspecified → 3.0 Branch
Keywords: regression
I finally appeared to eliminate this problem by setting "browser.cache.memory.enable" to "false" in "about:config" which returns CPU use back to "normal" when loading a tab in the foreground when two or more tabs are present.

I'm leaving this as unconfirmed until someone else can duplicate this.
Can't block on unconfirmed bugs - Tony/QA, have you guys seen this?
Flags: blocking-firefox3?
Keywords: qawanted
Mike,

Sorry about that. Rather new to Bugzilla and it looked like I was just adding a question mark. The "fix" I mentioned is working well for myself and the few others that have tried it that were having experiencing this problem also.

Thanks for looking into this.
Here's my first set of tests done on the same system as I described in my previous comment. I used the Firefox Add-ons site in this first set of tests for the reason that it's a graphic intensive, high traffic site running several scripts and a low traffic site with simple graphics and two simple scripts in the second round.

Regression range: Best estimate is the trunk nightly build of 05/12/2008 (or a very few days before) which I believe is the nightly build where the last blocker for RC1 was fixed. 

Tests were done in my normal profile with the following extensions installed.

Note: I previously ran a "less formal" run of tests and I found negligible difference between using the profile below and a fresh, unpopulated profile with all plugins and Phishing/Malware protection disabled, running in normal or safe mode. Problem not seen in Beta 5 release. I will run a second set of tests on with a new profile as described above as soon as I can.

First test set:

Extensions:

Adblock Filterset.G Updater 0.3.1.3
Adblock Plus 0.7.5.4
Blog This in Windows Live Writer 1.0.1
ChatZilla 0.9.82.1
CuteMenus - Crystal SVG 1.9.2
FEBE 6.0b(20080512_152139)
Firebug 1.2.0a30X [DISABLED]
Flashblock 1.5.6
Nightly Tester Tools 2.0.2
One-Click Installer for WP 1.0
QuickJava 0.4.2.1
ScribeFire 2.2.5
SeoQuake 2.1.3
SQLite Manager 0.2.40
Undo Closed Tabs Button 3.0.2

First round of tests done using two tabs, Google.com in tab 1 and the Firefox Add-ons site in Tab 2.

Load/reload times for the Firefox Add-ons site with "browser.memory.cache.enable" set to false:

Initial load: 10 secs
Reload 1: 5 secs
Reload 2: 7 secs
Reload 3: 6 secs

CPU load no more than 5% to 30% max.

Load times for Firefox Add-ons site (https://addons.mozilla.org/en-US/firefox) with "browser.memory.cache.enable" set to true:

Initial load: 1 min, 15 secs.
Reload 1: 57 secs
Reload 2: 29 secs
Reload 3: 20 secs

CPU at 100% until pages finished loading. Interesting about the decreasing time each reload. No idea yet about that.


Second round of tests using two tabs, Google.com in tab 1 and Northern Counties Health Center (NCHC) Dental page in tab 2. (http://www.nchcvt.org/ipdc.htm)

Load times for the NCHC site with "browser.memory.cache.enable" set to false:

Initial load: 3 secs
Reload 1: 3 secs
Reload 2: 2 secs
Reload 3: 3 secs

CPU use no more than 7%.

Load times for the NCHC site with "browser.memory.cache.enable" set to true:

Initial load: 12 secs
Reload 1: 7 secs
Reload 2: 10 secs
Reload 3: 8 secs.

CPU at 100% until page finished loading.

As I said previously, I'll run the same tests using a fresh profile with no extensions and all plugins disabled etc, as soon as I have the time. Hope this helps some.


>Windows XP Pro SP3 (with hotfix that fixes SQL DB corruption in MS's Retail Management System installed)

>AMD 3200+ single core 32 bit processor (P4 3.0Ghz equivalent) w/1Gb memory

>Dedicated video card w/256 memory (XGI Tecnology)

>768k DSL on a wireless Westell router.

Sorry for the delay in providing the next set of tests. Disabled vet dealing with disabilities.

This set of tests is done with a clean,unpopulated profile using RC1, same system as previous tests above. 


First round of tests done using two tabs, Google.com in tab 1 and the Firefox
Add-ons site (https://addons.mozilla.org/en-US/firefox) in Tab 2.

Load/reload times for the Firefox Add-ons site  with "browser.memory.cache.enable" set to false:

Initial load: 8 secs
Reload 1: 5 secs
Reload 2: 6 secs
Reload 3: 5 secs

CPU load no more than 5% to 30% max.

Load/reload times for Firefox Add-ons site with "browser.memory.cache.enable" set to true:

Initial load: 1 min, 55 secs.
Reload 1: 20 secs
Reload 2: 25 secs
Reload 3: 20 secs

CPU at 100% until pages finished loading.

Second round of tests using two tabs, Google.com in tab 1 and Northern Counties
Health Center (NCHC) Dental page in tab 2. (http://www.nchcvt.org/ipdc.htm)

Load times for the NCHC site with "browser.memory.cache.enable" set to false:

Initial load: 4 secs
Reload 1: 3 secs
Reload 2: 2 secs
Reload 3: 2 secs

CPU use no more than 7%.

Load times for the NCHC site with "browser.memory.cache.enable" set to true:

Initial load: 1 min 40 secs
Reload 1: 38 secs
Reload 2: 40 secs
Reload 3: 45 secs.

CPU at 100% until page finished loading. Uncertain why the significant increase in load/reload times between the first set of tests with memory.cache enable set to true and the above load/reload times since all the other tests in this set are consistent with the first set.

>Windows XP Pro SP3 (with hotfix that fixes SQL DB corruption in MS's Retail Management System installed)

>AMD 3200+ single core 32 bit processor (P4 3.0Ghz equivalent) w/1Gb memory

>Dedicated video card w/256 memory (XGI Tecnology)

>768k DSL on a wireless Westell router.
I experience the exact same issues, in the exact same manner.  I've run the tests as outlined with very similar results, with a fresh profile, no extensions or plugins, though they don't make a difference in the outcome.

WinXP Pro SP3, Pentium4 1.7GHz (original P4), 1GB RDRAM, ATI x1300 Pro AGP w/256MB dedicated DDR2 RAM.

Problem does not occur on nightly build of 05/11/08, problem first appeared on nightly of 05/12/08, which I believe is the RC1 build.  Problem has occurred on all subsequent builds.
Reporter, is it still a problem with Firefox 3.5.2?
Whiteboard: [closeme 2009-09-09]
No response. Please reopen the bug if you have an answer to comment 8. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2009-09-09] → [closeme 2009-09-08]
You need to log in before you can comment on or make changes to this bug.