Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upgrading Unity causes significant performance degradation

After upgrading from Unity 2020.3.22f1 to 2021.3.3f1, the rendering process called Semaphone.WaitForSignal started to take up most of the CPU time and the frame count dropped significantly.
Upon investigation, we discovered that CurvyGenerator.Update() from the profiler had Invoke attached to it.
[Image: dotup.org2808838.png]

Invoke is not attached in 2020.3.22f1.
[Image: dotup.org2808837.png]

In fact, when Auto Update in Curvy Generator is unchecked, this phenomenon no longer occurs.
What does Invoke mean in Curvy Spline?

I am running macOS 12.3.1 and Curvy Spline 8.2.1.
I have separate environments for 2020.3.22f1 and 2021.3.3f1 to investigate the issue.

Note that we have encountered the same problem in the past when using Curvy Spline 7 and upgrading Unity from 2020.3.22f1 to 2020.3.25f.
At that time, I couldn't even find a solution to the problem, so I gave up investigating and downgraded to deal with the problem.
This is my first time developing a game and to be honest, I don't even know if Curvy Spline is the cause and I am struggling with this issue.

  1. Is this a Curvy related issue?
    It seems to me that it is not, since the Update method is taking nearly the same time in both scenarios. Also, the increase in CPU usage is done inside a method waiting for GFX commands. Curvy is mostly about CPU work, and not graphics one, so I doubt anything in Curvy could make the wait for graphics commands longer.I looked in Curvy's code for all the usages of the Invoke method (which is a Unity method used mostly to call methods with a delay). I found only one usage of the Invoke method on the CurvyGenerator's Update method. The call stack pf the Update method in the profiler's screenshot is clearly different from the one calling the Invoke method, but for the sake of completeness, let's ignore this point. The Invoke method is called inside the editor of property drawers. So to make a test, let's try to not make that code execute. That means: please try profiling again while making sure that no Generator window (or any other window from Curvy) is open, and no Curvy related game object is shown in the inspector. Did this change the profiling result?
  2. How to solve the issue?
    Based on my belief that this is due to a regression in Unity, please look in their forums (and internet in general) if anyone had the same issue. If no luck with that, try using the Unity versions between 2020.3.22f1 and 2020.3.25f to define which version introduced the regression. Once that done, look at its release notes, maybe something in their might help. Otherwise, open a unity bug ticket with all the details you have. Creating a forum thread on their forums might help too.
I hope that this will lead you to solve the issue.All the best, and have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
I tried profiling in the way you mentioned, but it certainly didn't change the results.

When I was trying more things, I noticed that other assets were also behaving strangely, so Curvy Splines is irrelevant.
Unfortunately, this is an unknown issue that I have not found in a search, but I will consider going back and forth between Unity versions from 2020.3.22f1 to 2020.3.25f to investigate or rework the project.

Thank you for your detailed answers to this questions!

Regressions in Unity are a real pain in the buttocks. I have to deal with them way more often than I would like, as you can see here:
If there is a Unity issues ticket open regarding this issue, please let me know so that I upvote it.

You are welcome Smile
Let me know if I can help with anything
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Unity 2021.2 Overlay System nehvaleem 1 5 01-25-2022, 10:57 AM
Last Post: _Aka_
Exclamation DuplicateEditorMesh performance issue Guillaume 5 12 01-18-2022, 01:44 PM
Last Post: _Aka_
  Please vote for this Unity bug report if you can _Aka_ 0 54 12-03-2021, 10:05 PM
Last Post: _Aka_
  Curvy not appearing in Unity 2019.2.14f1 bmacdonald1986 5 3,112 11-25-2021, 10:52 AM
Last Post: _Aka_

Forum Jump: