Node webkit = high CPU usage

Discussion and feedback on Construct 2

Post » Thu Jan 21, 2016 8:20 pm

The node webkit using significant CPU (more than 120%). I installed the new version of node webkit that I downloaded from the Scirra's website but it didn't work. How can I fix it?

Edited: Mac I7 + VMWare
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Jan 22, 2016 9:46 am

Really needing some help with this issue.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Jan 22, 2016 9:58 am

What does has the high cpu usage? An App exportet with NWjs or the installation itself?
If it's an App do you mean the windows, macOS or Linux version, 32 or 64 Bit?
Can you provide an example if it's a Windows-App?
B
23
S
3
G
1
Posts: 411
Reputation: 2,060

Post » Fri Jan 22, 2016 10:02 am

You might want to check if any code is using most of the cpu somewhere.
Run the game in debug layout and switch the tab to profile. That tells you what percentage of CPU is being used where.
B
12
S
4
G
1
Posts: 137
Reputation: 1,519

Post » Fri Jan 22, 2016 10:08 am

Haven't seen this.

You need to provide a lot more information - I'm not a fan of guesswork.

Is this for all projects?
Is it when previewing?
Is it when running in debug?
Confirm both the C2 version and NW.js version. Latest are both available from HERE.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
126
S
29
G
73
Posts: 5,086
Reputation: 51,992

Post » Fri Jan 22, 2016 11:24 am

It happens when I preview the game through C2. I have read now that has some incompatibility with node webkit and vmware. I'm checking it now. Sorry about the inconvenience.
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Jan 28, 2016 2:34 pm

I did some tests in my computer and in my iPhone using the application built in the Intel XDK.

C2 version: 221
Node Webkit: v0.13.0 beta 4 (Chromium 48) [Requires r217+]

This is the result of the game running in debug mode (node webkit). Obs: This is a static menu that has no motion and uses its own event sheet.

Image

The same result using chrome to preview game in debug mode instead node webkit

Image

Other strange behaviors:

Mac:

While previewing the game in node webkit, my Mac's CPU consumes 120%. Something similar happens when the Intel XDK is building the application.

iPhone:

The device getting extremely hot and the battery decreases quickly after five minutes
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Thu Jan 28, 2016 2:48 pm

The profiler tab will tell you where that CPU time is actually being spent.
Scirra Founder
B
378
S
220
G
84
Posts: 23,863
Reputation: 188,019

Post » Thu Jan 28, 2016 3:50 pm

@Ashley

When I open the profiler tab, the fps and the cpu informations normalize gradually, but the node webkit continues consuming CPU. The same happens when I build an app in the Intel XDK.

I forgot to say, but something wrong happens in the game when I testing in my iPhone. I've two variables to control values: one to control the current and other to control the previous amount, that the current value assumes when the player doesn't complete the mission. Some times, the previous value changes to an older value (three levels ago). It happens in different levels and there is nothing wrong in the script, because I tested the game in the preview mode and this problem doesn't occurs. This kind of behavior is possible when the iPhone processing is too high?
B
70
S
13
G
2
Posts: 989
Reputation: 6,914

Post » Fri Jan 29, 2016 12:24 pm

Well if the same happens on a different platform (Intel XDK), that suggests it's not NW.js using up all the CPU, but it's actually your project! Either way, it's going to be difficult to provide any more help without an example .capx.
Scirra Founder
B
378
S
220
G
84
Posts: 23,863
Reputation: 188,019

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests