(IN-36009) [1.21.12] GC spike every frame

Addressables is keep generating 440 bytes gc spike every frame after installing Unity Profiling Core API package at Preferences - Addresssables

Bump

Hi @optimise thank you for bringing this to our attention. I will have a look into this and see if we can remove the allocation and get back to you.

1 Like

Any new update?

In-36009 has not yet reached us, if this continues ill check it to make sure it has not slipped through any gaps

Hi. Any new update and when the bug will be fixed at which Addressables version?

Latest 1.21.12 version still not fix the bug

Hi @optimise I have not been focusing on this, and put it quite low priority due to only a small amount of gc and debug builds only. Though I can see it having a light impact on checking for overall gc, it shouldn’t impact profiling in general, so have focused on higher priority and not started this.

Unless I have mistaken some impact and this is affecting you in some way more and I can reevaluate?

:hushed: It affects my actual game runtime build because of this gc spamming. I want to make it gc free.

I’ll look into it, and prioritise it if it affects runtime builds in particular.

1 Like

Or u can just quickly implement scripting define symbol like ADDRESSABLES_PROFILING to remove all the profiling code when dun have this define to solve it.

It already is, that doesn’t stop it unfortunately as the define is set where the dependency package profiling core is installed, which includes release builds.

As for the method itself. I found the profiler enabled was not being checked, and the code was also inefficient. Both will be fixed in the next release,

So technically should auto strip this api package when building release mode of game build? And also the code was also inefficient do u means it’s possible to make it gc free at development game build since I see other official package able to make it gc free even using this api package?

That would remove the code from compiling yes, as the package isn’t really needed in release.

Yes, the problem was that it was creating an empty Dictionary and using an IEnumerable method to parse potential data, which isn’t great.

1 Like