GameObject.SetActive() creating massive garbage for UI Object

I don’t know what’s wrong with unity’s UI system. I really have no idea. I’m using unity 5.3.4 on my latest project & all the massive GC allocation is happening on activating or deactivating UI object. Please checkout the attached screenshot & help me out to solve this.

Activate and Deactivate UI elements is really GC expensive which is really anoying especially for mobile. Each elements will take 0.5Kb at least. It’s Unity stuff so you can only wait a 5.x that will improve this thing.

Or try to use it only when player can’t notice the spike. For example, I use it for big menus or UI windows that froze or hide the game view.
For little UI elements you can hide it off screen and show them with a little animation. For example, I have a little map that I let off screen and I show when needed with an Animator Component on the Panel.

BTW in your pic, your Monobehaviour part seems really FPS expensive, maybe try to optimize it to let more fps for UI expensive stuffs.