CPU Utilization...?

Discussion and feedback on Construct 2

Post » Thu Jun 18, 2015 11:13 am

Ashley wrote:Your numbers are very likely wrong.....Chrome will happily use up 100% of the cpu if you give it that much work.


My numbers were wrong because I was reading from the App Running section of the Task Manager; it was late and I was tired :roll: . Chrome was actually demanding nearly 14% of my CPU when the in-game in-thread time was indicated as 60% cpuutilisation. Since making the first post I have already reduced the amount of array work being done at little cost visually to the game, but there is still room for improvement.

Some good notes in the blog - I will re-read (and try to digest) it! Just to prove that I'm not going bonkers - here's a screen shot from my game (not the demo - the array work happens on a later level and the cpu use in the demo is low). This shows 2 modes of 2 graphics processors in use - normal and max'd out. As you can see,the use of Chrome sits at approx 15%; as Ashley says, there's no easy way to determine how much of which core is being allocated to the game, but it might be reasonable to assume that, with 4 cores and 8 logical processors, that one of those logical processors is being fully utilized. I never expected a little array work to cause so much pain! As you can see, the idle and max'd out values are better when not using intel integrated graphics...

Image

Thanks everyone for the responses and thoughts - some good refreshing of stuff I should have already known, and a lesson about Intel integrated graphics...
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,251
Reputation: 46,476

Post » Thu Jun 18, 2015 2:56 pm

@nimos100 very true, and ive asked for the debugger to start in anything other then the system page, by selecting an object or having a setting because it bogs down anything you're testing,

here's a good test to compare how fast our cpu's are, it takes my cpu 7% for running an empty project... (hmm where should i optimize?)
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Thu Jun 18, 2015 3:39 pm

I've noticed this as well @Colludium but it's not an accurate measurement.

As Ashley stated, CPU utilization it's not all that accurate, thus your CPU % numbers are most likely incorrect as well. Knowing this shouldn't leave you scratching your head though. Granted the debugger adds to the CPU usage and can bog your game down in the Inspect tab (All of the game ) - knowing that it adds overhead, it still provides some useful info on a per event basis. I typically will use the Profile tab to see what events are using the most CPU. After I see something that is using a bunch of CPU (accurate %'s or not), I will dig deeper and single out those events and and monitor the (Watch) tab to see what they are doing so that I can optimize.

I'm not looking for rock solid performance on the debugger, (though it would be sweet!) - Ultimately no one will be playing your game with debugger running. Knowing that it adds to the CPU usage makes it pretty easy to figure out where the real issues and spikes are. Profile tab is the key, and then singling out specific events via the Watch tab. ;)

Out of curiosity and lack of knowledge on multi threading CPU stuff @Ashley what is the likely hood of multi threading support in the future or with C3? or is the effectively an HTML5 limitation for the moment?
Image Image Image
B
63
S
19
G
6
Posts: 325
Reputation: 7,994

Post » Thu Jun 18, 2015 4:21 pm

inspect tab bogs time the system... so ... dont start there, starting at profile tab would be better, but hey i dont have lots of problems with it, i wonder you could probably change it in the js code wich tab opens first..
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Thu Jun 18, 2015 4:46 pm

The inspector is ace for everything but performance measurement - although the profile tab is awesome for identifying dirty events. That's why I always use a debug text object with a huge list of set-text options that I toggle enabled when required.

If cycling through an array hurts at 60hz, how will the owner of a 144hz monitor fair? I don't have the luxury... Might see if my TV is 100hz when I get home.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,251
Reputation: 46,476

Post » Thu Jun 18, 2015 5:02 pm

@facecjf - see the blog post I linked to on why events only run on one core. There's nothing there that is easy to change.
Scirra Founder
B
399
S
236
G
89
Posts: 24,529
Reputation: 195,390

Post » Thu Jun 18, 2015 6:43 pm

Thanks @Ashley That clears it up a bit. I see now that it is a double (or quad) edged sword. ;)
Image Image Image
B
63
S
19
G
6
Posts: 325
Reputation: 7,994

Post » Thu Jun 18, 2015 6:46 pm

It's one of the big flaws of the engines based on native export in HTML5
Image Image
B
25
S
14
G
139
Posts: 876
Reputation: 72,510

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests