Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GC Alloc dropping FPS when rope gets bigger
#1
Hello guys, I have a situation here. I'm creating (extending) the rope at runtime. But from time to time, seems the GC is allocating memory and its causing the game to "lag" as the time to update the frame reaches up to 300ms. Follows the image of the profiler when the this happens. I'm not sure if theres a way to solve this problem, if its from the ObiSolver perspective or from Unity's GC perspective. Thanks in advance for some light in this issue.

[Image: zWmpQcb.png]
Reply
#2
Another SS of this issue, with Memory profiler

[Image: ltGxrEV.png]
Reply
#3
*bumpĀ 
Really need to know about this intense GC Alloc happening
Reply
#4
(15-08-2017, 03:09 PM)leonrdo Wrote: *bumpĀ 
Really need to know about this intense GC Alloc happening

The GC itself is not the main issue. The fact that your physics loop is executed 17 (!) times per frame is. Reduce your max fixed timestep in Unity's time settings, because you're hitting a spiral-of-death-type situation.

Also, to reduce the GC, check the amount of colliders you've added to the solver. Having too many colliders added to the solver increases the GC each frame. Your profiler clearly shows the collider update method is the culprit.
Reply