Digging deeper in profiler GC.Alloc

Hi,

My main PlayerLoop looks like this now, Im zoomed in quite a bit but the whole thing is just a large amount of GC.Alloc from start to finish:

This is the zoomed out view:

If I read this correctly the PlayerLoop still takes up 80ms to do all the calculations, but I have trouble identifying exactly why.

When zooming in all I can see are a bunch of GC.Allocs spread out with plenty of idle time between them.

How can I figure out exactly what is causing the Allocs and how can I figure out why there is so much idle time going on here?

You could try to use deep profile to get more info.
Also it may be useful to use Hierarchy view to get info about which method trigger GC.Alloc

Thanks a bunch, I didn’t notice the option for a deep profile =)

It is now immediately clear that my problem is within my string based command parser logic. This is all I needed to know =)

1 Like

Also, If you just need to see more details of where the GC.Allocs come from, you can turn on Call Stacks, record and then select these GC.Alloc samples. The CPU Usage Profiler Module manual page has more details on this.