move_and_slide
is slower than with Godot Physics
#626
Labels
performance
Something isn't as fast as it probably could be
regression
Something that used to work but now doesn't
severity:minor
Small impact on functionality or usability
topic:runtime
Concerning runtime behavior (or its source code)
It appears that version 0.7.0 (most likely #559) introduced a performance regression to
move_and_slide
, causing it to take roughly twice as long as before, leading to it now being slower when compared to Godot Physics.Here's how to reproduce it:
When picking out some average-looking physics ticks in Superluminal, the total time spent in
move_and_slide
in this particular scene is as follows:Godot Physics (godotengine/godot@58f0cae): 4.74 ms
Godot Jolt (0.6.0-stable): 3.41 ms
Godot Jolt (0.7.0-stable): 5.70 ms
Godot Jolt (0.8.0-stable): 6.11 ms
(Note that these fluctuate quite a bit, so the difference between 0.7.0 and 0.8.0 seems to be within margin of error and probably not the result of further regression.)
When looking at
move_and_slide
more closely, it appears that Godot Jolt is returning collisions frombody_test_motion
that causes Godot to believe that some of them are not contacting the floor, causing it to runapply_floor_snap
here, which ends up taking as much time as the slide iterations themselves.The text was updated successfully, but these errors were encountered: