nw.js preview and export build performance difference

Discussion and feedback on Construct 2

Post » Wed Mar 23, 2016 11:17 am

I just tried nw.js RC4 and long story short, I'm seeing a significant performance difference between preview and final builds on my test laptop. Contrary to what I expected, the game runs faster (as in perfectly smooth) in preview but get the same kind of jerky lagspikes we've seen in earlier nw.js versions for win32/win64 export builds.

Laptop in question:
i5-5257U @2.7 ghz
intel iris graphics 6100 (newer integrated chip)
8 gig ram
Windows 8.1 64-bit

So, nw.js export builds seem to be bad news for integrated chips somehow while preview builds are doing fine. @Ashley could this be a texture atlas/fillrate thing and if so, is there anything that can be done to optimize it?
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Wed Mar 23, 2016 11:50 am

As ever, there is little I can offer without seeing a .capx example. Export should actually be more efficient than preview, because of all the export-time optimisations that are applied.
Scirra Founder
B
399
S
236
G
89
Posts: 24,539
Reputation: 195,422

Post » Wed Mar 23, 2016 12:05 pm

Fair enough. Right now I was really just trying to explore whether or not there was an obvious explanation for it, like several large sprite sheets overloading fillrate where loads of separate sprite frames wouldn't or something like that.
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Wed Mar 23, 2016 2:40 pm

OK, on my embryonic platform game, at the same re-spawn position with only some background bullet effects taking place...

nw.js 32 bit preview: 48% cpu
nw.js 32 bit export: 39% cpu
nw.js 64 bit export 61% cpu

It's illogical....
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Post » Wed Mar 23, 2016 6:26 pm

Could this be related to the problem of "ghost processes" being left behind, hogging resources in the background so when you played the final export it was slower? If so the newest C2 beta says it works around that problem, so try that if you haven't already.
FREEDOM: Diegesis - Out Now for Windows! http://freedom.quicksandgames.com
B
22
S
5
G
1
Posts: 83
Reputation: 1,818

Post » Wed Mar 23, 2016 8:08 pm

Hmm, task manager gives me roughly the same cpu usage for preview and export, and the processes terminate right away when I quit. @Colludium How did you measure cpu usage?
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Wed Mar 23, 2016 8:35 pm

I have a debug text object that I use to display cputilisation, memory use etc.

So, I tried again this time using r225 and the v13 rc4 nwforc2:

Preview: cpu 36%
export win32: cpu 36%
export win64: cpu 43%

With this later version of nw.js I'm not convinced that there are significant differences now (although I have no idea why x64 should use more cpu).

Of note, if I run an export and then run the preview, something in local storage causes a conflict and the preview crashes to black screen on start (and then won't close down). A memory wipe fixes this....
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Post » Wed Mar 23, 2016 10:34 pm

Colludium wrote:OK, on my embryonic platform game, at the same re-spawn position with only some background bullet effects taking place...

nw.js 32 bit preview: 48% cpu
nw.js 32 bit export: 39% cpu
nw.js 64 bit export 61% cpu

It's illogical....


I've always had much worse performance with 64 bit export so I've stuck with 32 bit.

I delete the 64 bit NW folder, so the preview is using 32 bit as well, and I get the same performance preview or export.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Thu Mar 24, 2016 3:03 am

It seems pretty obvious, but 64-bit NW is intended for developing on a 64-bit system, while 32-bit NW is intended for developing on a 32-bit system.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Thu Mar 24, 2016 6:59 am

LaDestitute wrote:It seems pretty obvious, but 64-bit NW is intended for developing on a 64-bit system, while 32-bit NW is intended for developing on a 32-bit system.


If my system wasn't a 64 bit i5 then I would not have been able to test it, I suspect. Perhaps there are benefits to the 64 bit version that are not being accessed by c2.... but if the 32 bit export is way better on a 64 bit system for us c2 devs then I don't see the point of having anything else...
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests