DOTS massive performance drop in UpdateEntitiesFromGrid

Hey Guys!

Does anybody know what “UpdateEntitiesFromGrid” in profiler means? I had a scene with ECS entities (25k+ with ~150 vertices each) running separately, leading to 45 FPS, then moving entities into a separate scene where only terrain is different and a few more objects are added, now dropping to around 10 FPS. If I run same scene without the ECS entities I get 45 FPS again. Also changing shadow and light settings have hardly any impact.


Launching same entities in other scene with just different terrain the said profiler entry does not consume performance at all:

Would like to dig further into “UpdateEntitiesFromGrid” to learn more about the reason.
Thanks!

You should investigate the Timelime view of the Profiler instead of the Hierarchy view.

here the timeline, but shows no different picture: UpdateEntitiesFromGrid consumes nearly whole ms.

Please show the whole view of Profiler window, don’t crop it. You should also expand the jobs section below. I suspect the code is not Bursted, but I need to see the whole view to be sure. Bursted code will appears as bright green color stripes.

the cpu usage is jumping from frame to frame, in a high usage the profiler shows the following:


next frame, the utilization is approx half of prior frame with folowing data:

so every “burst” frame is quite fast, next frame where the “UpdateEntitiesFromGrid” happens is very slow…

Entities Graphics does classical light probe evaluation on the main thread, despite the fact there’s a job API for probes. I have fixed this in my framework. Alternative solution is to switch to APVs, which I believe are fully GPU-based.

2 Likes

But the interesting point about this is that the high CPU utilization is scene-specific (using same ECS entities). Any hint which specific settings I need to compare? The lighting settings (inspector) are the same, also both scenes use the same URP settings. If I rebuild the scene from scratch the high utilization is also gone.

That system is running due to the existence of classical light probes in your scene. Check if you have light probes or occlusion probes or not.

Thanks! Will check these settings!