-
Notifications
You must be signed in to change notification settings - Fork 277
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
Improve the performance of EntityComponentManager::Each #711
Comments
After some further investigation, I believe that the views are responsible for most of the performance in In reality, we shouldn't have to do this, because the view should already have these components cached for every entity that has them. I think it could be good to change how components are saved in a view. Currently, we store components in a view using a I tried to put a band-aid on the drawbacks of using a If we were to take this approach, I believe that it would be crucial to create the following mappings (these mappings need to be fast):
A part of this proposed change/enhancement may involve changing how we store component IDs. Right now, we scope component IDs relative to their type (I'm not sure if this is an issue or not; I just wanted to point this out as something that we may need to consider when making changes): https://github.com/ignitionrobotics/ign-gazebo/blob/ignition-gazebo5_5.0.0/include/ignition/gazebo/Types.hh#L78-L86 |
Done in #856 🎉 |
Desired behavior
As discussed in #678 (comment), it seems like adding more components to an
ecm.Each
call reduces performance. Considering how often we call this method inign-gazebo
, it would be nice to optimizeecm.Each
so that performance is the same regardless of the number of components used.Alternatives considered
TBD
Implementation suggestion
See #711 (comment)
Additional context
Could be related to #429
The text was updated successfully, but these errors were encountered: