Physics performance degradation after a specific number of actors on a scene
- Source: stats.release.1590101186.zip
- Script: https://gist.github.com/elsid/995c1c6db11d756a292c23726672c91b
- Benchmark video record: https://youtu.be/quo6cTOWjaM
And this is quite interesting because the limit of 20 calls is not reached. And there is an explanation. The game time limit per frame is 200 milliseconds. Default physics FPS is 60. So if consider that each
MWPhysics::MovementSolver::move call represent one frame of physics we can get only
0.2 / (1 / 60) = 12 calls per frame.
Another thing is why we have this limit of 200 milliseconds of game time per frame? The most common FPS for movies is 24. 5 FPS makes game unplayable. Changing this limit to
1 / 24 make situation quite better. 0.045s for 200 actors instead of 0.2s:
The visible effect of the game time limit per frame change is game instead of slide show becomes slow motion. But I'd consider this as an improvement because at least it becomes playable.