8000 Query caching? (Performance) · Issue #22 · csprance/gecs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Query caching? (Performance) #22

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

Open
RafaelVidaurre opened this issue Apr 25, 2025 · 2 comments
Open

Query caching? (Performance) #22

RafaelVidaurre opened this issue Apr 25, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@RafaelVidaurre
Copy link
RafaelVidaurre commented Apr 25, 2025

First of all, thanks for the great addon, this looks very well architected and seems to be one of the only options available for implementing ECS in Godot.

I did some experiments and noticed that queries have a huge overhead performance-wise.

My question is, do you have any plans, or see any potential route for optimizing queries more? E.g. caching entities that match a query and keeping that cache up to date preemptively (e.g. when an entity is added to the world / when components of an entity are modified).

EDIT:
Another approach would be to index Archetypes instead of entities per component

Thanks again!

@csprance
Copy link
Owner

Yes, I certainly think there are a lot of opportunities to increase performance here. We can do a lot with archetypes and caching. I've been experimenting a bit with it as I make my game with this addon.

I'd be interested to see what kind of performance metrics you were getting as well.

I'm always down to collaborate and will accept pull requests as well if you're interested in helping.

The queries work but I'm not happy with the way they do things. I'd like to re-architect the ECS at some point but keep the same surface API.

@csprance
Copy link
Owner

Did a little bit of work on this in the latest update. Let me know what your thoughts are.

https://github.com/csprance/gecs/tree/3.7.0

@csprance csprance added the enhancement New feature or request label May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
0