Bug 802677 - Eats CPU on idle with statically looking page
Summary: Eats CPU on idle with statically looking page
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-13 09:27 UTC by Milan Crha
Modified: 2012-03-28 14:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 13:50:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Milan Crha 2012-03-13 09:27:08 UTC
When I open this URL in firefox
   http://www.sdltutorials.com/
then after it's loaded, and I do not do anything with that page, just looking at it, then firefox eats up to 20% of my CPU. If I change tab, like back to this bug report filling, then firefox calms down and is back idle. Selecting the SDL tab makes firefox back to eating CPU state, even when the firefox itself is not focused window.

I'm wondering what is wrong with that site that it eats my CPU.

This is with firefox-10.0.1-1.fc16.x86_64.

Comment 1 Jan Horak 2012-03-27 13:50:24 UTC
There's a 'game' loop in javascript on this page (game.php):
Main.OnLoop = function() {
  while(Events.HasEvents()) {
    var Event = Events.GetEvent();
    console.log("Event : " + Event.Type + " - " + Event.Key);
    Game.OnEvent(Event);
  }
  Main.Context.clearRect(0, 0, Main.Width, Main.Height);
  Game.OnLoop();
  Game.OnRender(Main.Context);
  FPS.OnLoop();
  setTimeout(Main.OnLoop, 2);
}
So this is most likely wanted to make your CPU busy :).

Comment 2 Milan Crha 2012-03-28 14:13:51 UTC
Thanks for looking at it. I'm wondering why they are doing that, but that has definitely nothing to do with firefox.


Note You need to log in before you can comment on or make changes to this bug.