Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lag in editor, trying to optimize it
#1
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]

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 ! Smile

[Image: 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 Wink

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 Smile
Reply
#2
Hi
That method renames the objects generated by the CG (mainly meshs and game objects). Deactivating it would only make all the generated objects to have the same name. To deactivate it, just add a return; as the first line of the method.
Can you please remind me of the forum post/mail you send me about the renamming issue?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Ok thanks ! I just wanted to know if I could desactivate it without problem Wink
Don't worry for the renamming part, it's working now, I may have a serious other problem with my own scritps...
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to set a speed in Unity Editor akira_sh512 2 2,425 01-26-2018, 12:36 PM
Last Post: akira_sh512
Question Editor Crashes coreyb 1 1,263 12-10-2017, 09:30 PM
Last Post: coreyb
  Referencing Paths in Editor johnnemann 2 2,405 06-15-2016, 01:43 PM
Last Post: Jake
  Spline Controller and Editor Scripts: changes not saved ABTOMAT 1 2,277 05-26-2016, 11:18 AM
Last Post: Jake

Forum Jump: