Hi! I have been profiling modded maps recently. I noticed that the EntityExtensions.ShouldInvert() hook has bad performance because of its DynamicData usage (see image from profiler), which affects SetLiftSpeed() for every actor and with that Update() for every actor.

(I have also contacted ChroniaHelper about the Tera Block hook which has a similar issue).
This isn't an extremely big deal since the hooks are only active for GravityHelper maps as far as I'm aware, but this still affects the performance of a fair number of maps (to some extent) I think :p
It seems like it would probably (?) make sense to use a GravityComponent field instead of DynamicData.
Lmk if you have any questions :)
Hi! I have been profiling modded maps recently. I noticed that the EntityExtensions.ShouldInvert() hook has bad performance because of its DynamicData usage (see image from profiler), which affects SetLiftSpeed() for every actor and with that Update() for every actor.

(I have also contacted ChroniaHelper about the Tera Block hook which has a similar issue).
This isn't an extremely big deal since the hooks are only active for GravityHelper maps as far as I'm aware, but this still affects the performance of a fair number of maps (to some extent) I think :p
It seems like it would probably (?) make sense to use a GravityComponent field instead of DynamicData.
Lmk if you have any questions :)