Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace internal map usage with slices #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kettek
Copy link

@kettek kettek commented Apr 27, 2023

I'm currently optimizing a particle effects subsystem and am running into some performance issues with a large amount of particles (1000+). Although I'm not expecting there to be that many particles with physics enabled, I fully expect there to be an impact from them during complex scenes (I was already seeing this, but optimized my own code as well to make it a bit better). My primary game map developer has a penchant for using lots of available systems to make things look really nice, but this comes at the cost of my own time spent optimizing.

At any rate, after some profiling, removing the usage of maps in a few locations (the ignore list and within the Object.Check func) gives a decent increase in performance -- was able to reduce Check's processing time by around 5 seconds (from 7.5 to 2.5, roughly). Clipped profiling is provided below.

pre

post

This can be significant when dealing with thousands of objects.
@kettek kettek mentioned this pull request Apr 27, 2023
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.

None yet

1 participant