PhysicsWorldHistory performance

We recently enabled LagCompensation and the added overhead from the PhysicsWorldHistory system was a bit surprising.

After looking into it, it seems like most of it comes from updating the EntityBodyIndexMap on clone. We can get around it for now by just disabling the Joints code which we don’t need, but do you have any thoughts on improvements in this area?

It is a lot better without having to update EntitytBodyIndexMap, but still would be worth to schedule it in a job if possible, although I think that would make it more inconvenient to access the worldhistory singleton without a sync point.