Editor Performance Drops Massively with Animators Enabled. (2020.3.43f1 LTS and 2021.3.16f1 LTS)

Hey everyone, this issue has plagued our 2D project across both the 2020.3.41f1-43f1 LTS and 2021.4.13f1-16f1 LTS versions of the Unity Editor. (This has been observed on workstations equipped with i9 13900Ks and 7950x’s, on both integrated GPU’s and RTX 4090 with 64GBs of ram)

The issue manifests itself when animators are active in the scene, and affects both the editor’s Game and Scene windows.

Tweaking settings and upgrading editors (and included packages didn’t seem to help)

I have profiled the editor and play mode, and determined that when animators are active, the EditorLoop consistently throws ~55ms delays that causes the FPS in game to tank. The culprit here is EditorApplication.hierarchyChanged: UnityEditor.U2D.IK.IKEditorManager.Initialize.

I have looked into it online to no avail. Unity Collections and Burst packages do not seem to remedy the issue either.

Comparison of EditorLoop Interrupts in Scene With Animators Active vs. Disabled:


Comparison of EditorLoop Interrupts in Game View vs Scene:

GPU Spikes Overlayed With CPU Spikes:

Unit Stats Window FPS vs In Game Reported FPS:

Hopefully there is a solution/patch to this issue, it’s been quite a big headache for us trying to preview animations in our project during runtime.

Cheers!

Hello,
This is a known issue, and we are working on a fix to roll out to the affected versions.
You can follow the progress here:

Awesome, thanks for your response!

Hopefully this inadvertently reduces some headaches for other people who’ve been plagued by the same issues.

Hi @Ted_Wikman , just checking in again.

I’ve profiled the project again on 2020.3.44f1 and have observed the same spikes, albeit just as an invocation of EDITORAPPLICATION.HIERARCHYCHANGED .

With animations in the Game Window:

Unity Version Confirmation: Imgur: The magic of the Internet
Profiler attached to Playmode, note the editor interrupts: Imgur: The magic of the Internet
Profiler attached to Editor, EDITORAPPLICATION.HIERARCHYCHANGED spiking consistently to 100ms corresponding with the frame drops :Imgur: The magic of the Internet

No Animations in Game Window,
Profiling Editor: Imgur: The magic of the Internet
Profiling Playmode: Imgur: The magic of the Internet

The system in question has a i9 12900k, other background processes are idle when capturing the data.

Hope this helps!

Thank you for testing it out, I’ll notify the QAs handling the case of your discoveries.