Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performance issue. Could you help?
#2
(19-10-2018, 06:39 PM)mmortall Wrote: Hello.
We have a performance issue and we found this lines in profiler. 
It seems like this operations leads to a huge performance drop. Can it be optimized in some way? Thanks.

This happens when we drop the soft body and it is simulated. 

[Image: CJf2JVB.png]

WaitForAllTasks() is being called 6 times per frame. This means physics is being executed a lot of times each frame, no wonder it takes a lot of time. All contacts in the scene are being copied between C++ and C# multiple times, so you're paying the cost of struct marshaling, x6. (Also, make sure that you absolutely need to use contact callbacks, you might not need to pay even x1).

Make sure you're not running into death spiralling. If you are, reduce Unity's "max physics timestep" parameter. See:
https://www.youtube.com/watch?v=sUVqa-72-Ms

Also remember than deep profiling adds a 60-70% overhead, so things will be much much faster with profiling disabled.
Reply


Messages In This Thread
Performance issue. Could you help? - by mmortall - 19-10-2018, 06:39 PM
RE: Performance issue. Could you help? - by josemendez - 19-10-2018, 09:35 PM