Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sporadic Performance Drops
#4
(30-01-2018, 11:05 PM)salvetori Wrote: Thanks for the reply Jose, I'll send an email with the scene.

Hi Salvetori,

After taking a look at your scene, I determined that the cause are sudden spikes in the GC collector. This is because your character's skeleton has many more bones than the one in the sample scene, and generates a lot more garbage for the GC to collect periodically.

Luckily, there's a way to reduce the amount of garbage generated when retrieving the bones from Unity. Replace line 577 of ObiCloth.cs:
Code:
for (int p = 0; p < sharedMesh.bindposes.Length; ++p){

with this one:
Code:
for (int p = 0; p < rendererBones.Length; ++p){

That should fix the issue.
Reply


Messages In This Thread
Sporadic Performance Drops - by salvetori - 30-01-2018, 05:44 PM
RE: Sporadic Performance Drops - by josemendez - 30-01-2018, 10:40 PM
RE: Sporadic Performance Drops - by salvetori - 30-01-2018, 11:05 PM
RE: Sporadic Performance Drops - by josemendez - 31-01-2018, 12:15 AM
RE: Sporadic Performance Drops - by salvetori - 31-01-2018, 01:47 AM
RE: Sporadic Performance Drops - by josemendez - 31-01-2018, 10:18 AM
RE: Sporadic Performance Drops - by salvetori - 04-02-2018, 05:53 PM
RE: Sporadic Performance Drops - by josemendez - 05-02-2018, 10:15 AM
RE: Sporadic Performance Drops - by salvetori - 05-02-2018, 09:14 PM
RE: Sporadic Performance Drops - by salvetori - 31-01-2018, 04:44 PM
RE: Sporadic Performance Drops - by salvetori - 06-02-2018, 04:51 AM
RE: Sporadic Performance Drops - by josemendez - 06-02-2018, 09:10 AM
RE: Sporadic Performance Drops - by salvetori - 06-02-2018, 04:16 PM