Seems that Unity is allocation in a background thread

Edit: this was marked as spam for some reason.

I found this thread when looking at my old SteamVR issue at GitHub that is linked from here.

Unity still doesnt help with showing which background thread is allocating. You have to scroll through the dropdown and try to find it one by one.

Man, this is 2 y old topic.

2 Likes

He links my GitHub issue. And its still not fixed

Or use Timeline view and look for bright magenta samples across frames, or use Profile Analyzer to find GC.Alloc sample across frames and threads?

Its about UX, here its very easy to identify

But not easy to dig in and find out whats allocating

But this view, I dont even know were to begin, there are several magenta strips

When you have those clear visible alloc spikes (good work, very good UX) a user expects that he can follow that trail and dig down. Not intuitive like it is at all.

Havent tried the analyzer package. But its beside the point since you do present alloc in the current UI.

edit: Managed to find it with timeline, had to expand scripting threads and then there was some red stripes there. But it doesnt really tell me anytrhing so I still need to go back, find that thread in the dropdown and then I can dig in deeper in the stacktrace

Yeah, we’re aware the UX isn’t great. I was just trying to give you other ways to work around it until we address this.

  1. You should be able to select it, switch to Hierarchy and have that view automatically retain the selection and show you the relevant thread. Might be your Unity version is to old to have that working properly though.
  2. You could turn on Call Stacks data collection, re-record and see the full callstack for these allocations
  3. Also, Deep Profiling should get you the scripting samples around that as well, if at a higher instrumentation overhead than the Allocation Callstacks feature
1 Like