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

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.

Thanks.
Reply
#2
Hi
  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.
Reply
#3
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!
Reply
#4
Hi

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: https://forum.curvyeditor.com/thread-514.html
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 12 02-26-2024, 09:49 AM
Last Post: _Aka_
  Unity 2021.2 Overlay System nehvaleem 5 17 12-15-2023, 10:09 AM
Last Post: _Aka_
  I want to improve the performance of Variable Mix Shapes yanke 7 8 07-27-2023, 09:15 PM
Last Post: _Aka_
  Animate UV Offset in Unity Animation Timeline sam_bond 6 8 05-26-2023, 11:12 AM
Last Post: _Aka_

Forum Jump: