Skip to content

Performance Improvements - #56

Open
karl2883 wants to merge 3 commits into
CommunalHelper:devfrom
karl2883:dev
Open

Performance Improvements#56
karl2883 wants to merge 3 commits into
CommunalHelper:devfrom
karl2883:dev

Conversation

@karl2883

Copy link
Copy Markdown

Two performance improvements:

  • add a ContainsEntity function that checks if an entity container contains an entity without allocations. Using GetEntities().Contains() as before allocates a new List each time, which is costly in hot paths
  • Rewrite the Collide.Check IL hook to only check for EeveeHelper relationships if the entities would actually collide - in an ordinary level, the amount of collision checks that fail because there is no collision should be vastly greater than the ones that fail because there is an EeveeHelper relationship, so this is cheaper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant