This object is in archive! 

MyEntity.InScene is responsible for 4% of Main thread CPU load on a large server

Guest shared this bug 2 years ago
Reported

Game version: 1.200.029

Problem: Simulation speed drop due to high main thread CPU load.

While this is not the highest CPU consumption in this case, this could be optimized:

Property MyEntity.InScene is read a lot of times and responsible for 4% of the Main thread CPU load in case of a 592 grid large multiplayer server. I've been profiling their world save locally, because they have a lot of players and their SS drops at peak hours.

In order to reduce the CPU load a bit, please make sure:

  • The getter is aggressively inlined by the compiler.
  • The property getter is as simple as possible. (It is already quite simple boolean logic, but it may worth caching it in MyEntity instances directly to avoid the lookup into the Render object.)
  • Try to eliminate excess reads of this property. Maybe some of them could be avoided in inner loops.

It does not seem much, but can make a difference for little effort.

I can profile it on the same world if there is a fix.

The world is 490MB and not public, so I cannot attach it here.

If I can come up with an artificial test world, then I will include it later.

Replies (2)

photo
1

Hello, Viktor,

thanks for letting us know. Issue was reported internally.

Kind Regards

Keen Software House: QA Department

photo
1

Fixed in game version 1.202.048 (Automaton Beta)

Leave a Comment
 
Attach a file