Severe performance issues

Options
We are experiencing severe performance issues with truesync in the following scenario.
We have a number of truesync enabled prefabs, i.e. they have TSTransforms, TSCollider. On game start we preinstantiate 250 of these in our pool. All these instances are disabled.
We use TrueSyncManager.Instantiate to instantiate the prefabs.

In this scenario TruesyncManager.FixedUpdate uses around 350ms per frame.

Nothing else is going on in the scene, so the question is why FixedUpdate uses this much time when in fact it should be using none at all?

If we add a TSRigidBody and disable gravity on it, the problem gets even more pronounced. With only 4 disabled instances in the scene we see the same performance hit.

Needless to say this is a major issue and I hope you can assist us with finding a solution.

Best Answer

Answers

  • JeffersonHenrique
    Options
    Hi @Geminior,

    We have some performance issues with a moderate/high number of physic bodies, this is a point. Another thing is that when you fill your pool are you using TrueSync.SyncedInstantiate?
  • Geminior
    Options
    We are using the TrueSyncManager for both instantiation and destruction.
    We don't even have a TSRigidBody on the instances at this point, just a TSCollider.
    If we add a TSRigidBody the problem simply becomes much worse, essentially locking up Unity completely.

    Mind you all these instances are disabled, hence nothing should be running on them and they certainly should not be part of any physics calculations.

    In addition to the CPU use, there are massive allocations as well, ranging from 80kb to 500kb per frame.

    I have created a test project that shows this problem, please let me know where I can send it.