In EntityX EntityManager
has a method entities_with_components
that returns all entities that have the required components. In the example of Emitting Events
I see double usage of that method:
for (Entity left_entity : es.entities_with_components(left_position)) {
for (Entity right_entity : es.entities_with_components(right_position)) {
Is it performance effective or it queries to find the appropriate entities twice?