10-03-2019, 09:11 AM
(This post was last modified: 10-03-2019, 09:39 AM by UsernameHed.)
EDIT: I speak here only in editorMode (not in play mode). It's juste the unity edtior which start to lag a bit.
Hello ! I am getting more and more lag in editor mode. I am profiling and optimizing my scene.
I came across one optimisation I can't resolve myself, here is the profiler:
![[Image: IJdjgMQJasR_lag.PNG]](https://www.cjoint.com/doc/19_10/IJdjgMQJasR_lag.PNG)
Here we see that CGModule.Update() is called x180 per frame, and taking 21ms (it take me 20fps of my editor)
And the GC.alloc is called 13716 time, a lot !
I have some Spline and Generator in my scene always active.
I have created a boolean "optimize editor" in my scene view, I activate it when I want to have an optimized scene.
When it's active, I search for every generator, and desactivate the option "auto refresh".
But the CGModule.Update() is still present. Where are they used ?
Thanks !
![[Image: IJdjKXcLZoR_internal.PNG]](https://www.cjoint.com/doc/19_10/IJdjKXcLZoR_internal.PNG)
I think this function cause this lag. It use reflexion and it's extremly costly.
And I think it's also the cause of the renaming problem I still have by the way
what is the purpose of this function ? how can I cache, or desactivate it ? Can I desactivate it totally when i'm not modifiing the spline or generators ?
Thanks
Hello ! I am getting more and more lag in editor mode. I am profiling and optimizing my scene.
I came across one optimisation I can't resolve myself, here is the profiler:
Here we see that CGModule.Update() is called x180 per frame, and taking 21ms (it take me 20fps of my editor)
And the GC.alloc is called 13716 time, a lot !
I have some Spline and Generator in my scene always active.
I have created a boolean "optimize editor" in my scene view, I activate it when I want to have an optimized scene.
When it's active, I search for every generator, and desactivate the option "auto refresh".
But the CGModule.Update() is still present. Where are they used ?
Thanks !

I think this function cause this lag. It use reflexion and it's extremly costly.
And I think it's also the cause of the renaming problem I still have by the way

what is the purpose of this function ? how can I cache, or desactivate it ? Can I desactivate it totally when i'm not modifiing the spline or generators ?
Thanks
