Jump to content

Ridiculous CPU usage?


SlimTim
 Share

Recommended Posts

So, I've begun fiddling with the tutorial example, but noticed that my fan was running a lot faster than it usually does. I checked the system monitor and noticed a CPU usage of around 50-60% when running the game code. This happens in both Firefox and Chrome. Is this normal? Any workarounds? It even slows down my code editor and other tasks.

 

Sometimes it freezes for about 10 seconds, then continues but leaves the computer in a very sluggish state. - Scrolling vastly slowed down, programs shut down very slow etc. What is even more disconcerting is that nothing in the system monitor indicates any resource hog after I shut the browser down, yet the problems persist until I reboot.

 

PS: I run Ubuntu 12.04 on a a i5 quad-core 2.5 GHz, 4 GB RAM.

 

Bonus question: When upgrading from 1.1.3 to 1.1.5 gravity seems to get botched resolving A LOT slower than it should (and does in 1.1.3). What gives?

Link to comment
Share on other sites

If you have an old computer (> 5yrs) then, yes, this could be an issue. I experienced similar problems with my old 2008 MacBook.

 

As for gravity: I think it's been updated to work the same way velocity does so everything's consistent. I think it's now measured in pixels per second rather than pixels per frame, which is supposed to keep movement frame rate independent (anybody please correct me if I'm mistaken!).

Link to comment
Share on other sites

It's certainly not an isolated issue. I have experienced the same problem with am AMD 8-core cpu and 16GB of ram, running Ubuntu 12.04, in both Firefox, and Chrome.

All the examples give the same issue. I can create an empty phaser game with no sprites, and it's still the same results.

 

Gotta be some way to tell the engine to yield some time slices to the cpu when it's idle.

Link to comment
Share on other sites

I would say that RAM and even CPU speed are irrelevant here, the issue is the quality of the WebGL+GPU drivers on Linux. If an 'empty' phaser game does it then all you've got is a single canvas and a requestAnimationFrame loop going on. There's literally nothing else happening internally, hence back to my previous post about testing other Pixi / WebGL related demos too, because I'd wager they cause the same result. What would be interesting to know is if it only happens in WebGL mode, or Canvas too.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...