Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Looking for help regarding the profiler

A topic by LyJam created Mar 15, 2024 Views: 101 Replies: 4
Viewing posts 1 to 4
Submitted

Hey, I was wondering if anyone here can help me interpret the data I get from the profiler. The 'SetActiveArray' and 'CalculateNextGeneration' jobs are my own. However, I don't know what the processes 'Default World Unity.Entities.SimulationSystemGroup' or 'Default World RunSimulationSystem', or all those other ones are and why they are taking up so much time. It is also not clear to me why the jobs wait so long to start and why there is a gap between them; in the code, they are configured to run one after another.

If anyone who has more experience with this can give me some insights into what is going on, that would be much appreciated :) 

kr,

Liam

Submitted(+1)

It seems you have some heavy task before you schedule jobs in your system. eg. allocate a large array. To figure out which piece of code takes time, you could use ProfilerMarker 
https://docs.unity3d.com/ScriptReference/Unity.Profiling.ProfilerMarker.html 

Submitted

Great tip, I didn't know that existed. Thanks!

Host(+1)

In Unity ECS systems update in kind of a hierarchy - the player loop consists of 3 main sections initialization, simulation, and presentation. What you are seeing there is the plumbing of how the simulation system group works. By default (if you don't specify anything) Unity will schedule new systems into the simulation system group. If you follow the hierarchy down to the bottom, you see that the lowest entries on the profiler are your jobs that you have scheduled. Then in the next sections down you see your jobs also running on multiple threads. The simulation systems need to wait for your jobs to complete, so it it not that the simulation system groups are taking up so much time, but it looks like your jobs are taking up a bulk of that time (which is to be expected). 

The reason for the gap is that there is likely another job that got scheduled in between your two jobs, you'll be able to see this if you scroll down the profiler a bit.

Hope that helps!

Submitted(+1)

Gaps may also be caused by DOTS safety mechanisms if you are profiling in editor instead of a build