Performance relating to machine running cs2

Discussion and feedback on Construct 2

Post » Sun Oct 04, 2015 2:10 pm

I have been busy with a RTS engine for space games and its working very well.

During some tests and trials with multiple computers I ran into this this strange oddity which I accidentally discovered only effects the machine running the construct 2 application.

Example/info:

I tend to start the host when I launch the previewer from the construct 2 app.

I was testing the host CPU usage, when 2 players had each roughly 15 vessels ....
The peer was/is on another computer in the same network.

The host runs smooth, up until the peer connects and then it somewhat seemed like ~30-40% more CPU usage then the peer.

Which annoys me, as I have designed my engine to distribute the load between peers and host.
I had expected the host and peer to run with about the same CPU %, which it didn't.

After some pointless tweaking and restarting the previewer I accidentally made the other computer in the network the host, making the computer having the construct 2 app, become peer.

Surprise surprise .... the peer (computer with construct 2 running on it) suddenly had the ~30-40% more CPU usage then anticipated, and the Host on the other system, ran with the low CPU usage, which I was expecting in the first place.

Sooooooo ......

I hooked up another system in my network, and started a game between 2 computers in the network, not including the computer running the construct 2 application.

And wow ... the game ran smooth as can be ... both systems low CPU usage .... as expected ....


But now my questions is, why is this ? how come the system running the Construct 2 application adds to the CPU usage ?
Perhaps I am overseeing something obvious ...



TLDR;

A system running the construct 2 application, adds quite a bit of CPU % usage to the CPU usage indicator in the debugger.
At least where multiplayer is involved and a peer connected.

Why ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Sun Oct 04, 2015 3:24 pm

Lol, haven't a clue, but possibly because preview is a premium feature, it might have multiple processes running in background???
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,708

Post » Mon Oct 05, 2015 10:53 am

DUTOIT wrote:Lol, haven't a clue, but possibly because preview is a premium feature, it might have multiple processes running in background???



The only thing I can even remotely think of is that the previewing browser sends a lot of calls back to the http server. Perhaps this communication stream is interfering when the multiplayer plugin is in play.



@Ashley, Any ideas ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Mon Oct 05, 2015 11:43 am

No idea, your best bet would be to run the profiler in Chrome's dev tools and see where JS time is being spent.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Mon Oct 05, 2015 11:40 pm

Are you checking cpu usage with debug/profiler or using the cpuutilization text?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Tue Oct 06, 2015 10:40 am

Silverforce wrote:Are you checking cpu usage with debug/profiler or using the cpuutilization text?



That should not matter, as it only occurs on the machine running construct.

I will do some JS browser tests later on.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 2 guests