This object is in archive! 

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

Viktor Ferenczi shared this bug 7 months ago
Reported – Awaiting fix

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 (1)

photo
1

Hello, Viktor,

thanks for letting us know. Issue was reported internally.

Kind Regards

Keen Software House: QA Department

Leave a Comment
 
Attach a file