SlimTim Posted February 15, 2014 Share Posted February 15, 2014 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 More sharing options...
Michel (Starnut) Posted February 15, 2014 Share Posted February 15, 2014 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 More sharing options...
rich Posted February 15, 2014 Share Posted February 15, 2014 Try running some of the Pixi.js demos directly and see if you experience the same kind of slow-down. If so then there's nothing we can do I'm afraid, it's obviously a browser/CPU/GPU issue specific to your set-up. Link to comment Share on other sites More sharing options...
Bang Bang Attack Studios Posted February 16, 2014 Share Posted February 16, 2014 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 More sharing options...
rich Posted February 16, 2014 Share Posted February 16, 2014 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 More sharing options...
rich Posted February 16, 2014 Share Posted February 16, 2014 Gotta be some way to tell the engine to yield some time slices to the cpu when it's idle. Of course not, this is JavaScript we're talking about. What makes you think we have ANY indication at all over what the CPU is doing?! Link to comment Share on other sites More sharing options...
SlimTim Posted February 17, 2014 Author Share Posted February 17, 2014 I upgraded to 13.10 which seems to have fixed the problem, upgrading my GPU drivers in the process. Thus, rich would seem to be right. Link to comment Share on other sites More sharing options...
Recommended Posts