Skip to content

EntityExtensions.ShouldInvert hook impacts performance #92

Description

@karl2883

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.
Image
(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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions