I'm not sure what causes this, but this happens for me from time to time and I think it's related to newton or how I use newton (maybe somehow wrong at some point I don't know yet): From time to time, my simulation slows down, meaning eveything behaves like normal, but much slower. This happens deterministically as well, when I rewind the simulation and run it again it slows down at the same occations. It's also not more or less cpu intensive.
Does anyone have any ideas what could cause this? I tried the different friction and solver models and it happens with all of them. I tried not to call NewtonInvalidateCache() and loosing determinism but the behavior still occurs.
Basically, my scene consists of a static heightfield, several static primitives and some moving spheres with an upvector joint. And it seems to be bound to some of the moving spheres: When this occurs, there is at least one body in the scene which, when it moves, causes this effect. When it rests, the simulation runs fast again. When it starts moving, the simulation slows down again - and not just the surrounding area/island, the whole simulation.
I create those moving spehers all with the same code, so I can't see what makes them different like that.
My code is somewhat old, I started when 1.53 was new. With that version, I didn't have this effect. It's new for me to 2.x. So I assume, it's somehow related to newton/the way I use it.
I don't really know how to create a testcase for this like I did for the determinism issues. I could try and make a video - haven't done that before though

[edit]
Maybe it's related to my calls to NewtonBodySetFreezeState(). I call that function when I create a new body and I know it's resting from the start. I also call it during my AI calcuations when I know/want the body to rest - basically when an object reached it's destination and has to stop there and the distance to that point is below some threshold and the bodies speed as well. I tried removing all my calls to NewtonBodySetFreezeState() and from my first try, it doesn't seem to happen anymore.
Besides I can't find docu for that function. I just guessed NewtonBodySetFreezeState(body, 0) is the replacement for NewtonWorldFreezeBody(world, body).
[/edit]