distraub Posted September 4, 2018 Share Posted September 4, 2018 I am getting pretty high CPU usage in this playground and can't figure out exactly why. When I profile most of the time is spent in _renderForCamera https://playground.babylonjs.com/#HRYQ1L#20 I was getting 40-42% cpu, but leaving it for a little while the cpu hits 100%+ Any ideas on what I can do would be apperciated. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 4, 2018 Share Posted September 4, 2018 Well I tried on two different computers but I cannot see any increase in CPU consumption. Can you try on another browser perhaps? Quote Link to comment Share on other sites More sharing options...
distraub Posted September 6, 2018 Author Share Posted September 6, 2018 It looks like the raising CPU issue may have been a heat issue on this machine. I am still not sure what from that playground would drive it so hard. Do you have any optimization recommendations to curb cpu usage on that playground? Quote Link to comment Share on other sites More sharing options...
rje Posted September 6, 2018 Share Posted September 6, 2018 I noticed that this line in the playground js: fpsLabel.innerHTML = engine.getFps().toFixed() + " fps"; causes unnecessary overhead to the page rendering. Using 'textContent' should speed things up. Quote Link to comment Share on other sites More sharing options...
distraub Posted September 6, 2018 Author Share Posted September 6, 2018 @rjeThat is part of the playground system though, not part of this particular playgrounds code. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 6, 2018 Share Posted September 6, 2018 The optimization phase (sceneOptimizer) could be a little bit expensive regarding CPU but besides that I do not see anything relevant Quote Link to comment Share on other sites More sharing options...
distraub Posted September 12, 2018 Author Share Posted September 12, 2018 @DeltakoshThank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.