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

Consider caching interested entities #1

Open
HeroesGrave opened this issue Jun 25, 2015 · 1 comment
Open

Consider caching interested entities #1

HeroesGrave opened this issue Jun 25, 2015 · 1 comment

Comments

@HeroesGrave
Copy link

I'm not sure if performance is that much of a concern, but I thought I'd throw this in anyway. Feel free to close this issue if it's not going to be a problem.

Currently you have to filter through all entities every update cycle to get those a system is interested in. A system cannot (or should not?) lose interest in an entity unless its components are added to or removed from.

Therefore, you could get a nice performance increase by only checking modified entities, and caching interested entities with each system.

@johann2
Copy link
Owner

johann2 commented Jun 26, 2015

I don't know, bitmasks should be really fast, especially if you do it over a vector. And since caching adds significant complexity, I'll first write some benchmarks to see if it's a problem at all.

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

No branches or pull requests

2 participants