Skip to content

How to improve performance in entity relation scenario? #963

Answered by SanderMertens
piratf asked this question in Q&A
Discussion options

You must be logged in to vote

Are there any other improvements that could be made to the demo code?

Try upgrading to 3.2.1, it can improve query performance in some cases by 20-40% :)

How to create a system like the above that can also accept a singleton input?

Because you're using the iter function to iterate the query, adding a singleton will iterate entities one by one. The reason for this is query instancing. To fix this, you can either replace iter with each (easiest) or add .instanced() to the system builder (check the docs/examples to see how to iterate an instanced query).

And I just found that the group by feature could work even without the function

Yeah I need to update the examples to remove the cust…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@piratf
Comment options

@piratf
Comment options

@piratf
Comment options

@SanderMertens
Comment options

Answer selected by piratf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants