Fast iteration is a key part of using Unity. Entering play mode and recompile times can play a big part in slowing iteration cycles.
We recently spent some time profiling our project iteration time using Editor Iteration Profiler. Upon doing so we found that there are a number of classes in the Meta Core SDK that is using the [InitializeOnLoad] attribute. This gets called every time the assembly gets reloaded.
The worst offender is the GuideProcessor which alone adds over a second when entering play mode and allocates over 120mb of memory!
This GuideProcessor only seems to be used by the Guide Window, but it runs even if you don't have that windows open
It would be great if this could optimized. There doesn't seem to be any need for that code to be run apart from when the guide window is open.
While this is the worst example, there are other usages [InitializeOnLoad] where if they were all cleaned up could save considerable time during iteration.
Fast iteration is a key part of using Unity. Entering play mode and recompile times can play a big part in slowing iteration cycles.
We recently spent some time profiling our project iteration time using Editor Iteration Profiler. Upon doing so we found that there are a number of classes in the Meta Core SDK that is using the [InitializeOnLoad] attribute. This gets called every time the assembly gets reloaded.
The worst offender is the GuideProcessor which alone adds over a second when entering play mode and allocates over 120mb of memory!
This GuideProcessor only seems to be used by the Guide Window, but it runs even if you don't have that windows open
It would be great if this could optimized. There doesn't seem to be any need for that code to be run apart from when the guide window is open.
While this is the worst example, there are other usages [InitializeOnLoad] where if they were all cleaned up could save considerable time during iteration.