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

Improve performance of getObjects() for EntityGroup #117

Conversation

k-r-g
Copy link
Contributor

@k-r-g k-r-g commented Jul 19, 2022

MethodValueCache's getObjects() implementation was fine for a CacheGroup
because everything was already in memory and fast to fetch. However, an
EntityGroup would end up doing a separate query for every requested entity
and this could be quite slow.

This change simply uses the existing functionality of map() to get all
requested entities in a single query so it is faster for an EntityGroup.
Performance for CacheGroups is not impacted significantly.

MethodValueCache's getObjects() implementation was fine for a CacheGroup
because everything was already in memory and fast to fetch. However, an
EntityGroup would end up doing a separate query for every requested entity
and this could be quite slow.

This change simply uses the existing functionality of map() to get all
requested entities in a single query so it is faster for an EntityGroup.
Performance for CacheGroups is not impacted significantly.
@msmith-techempower msmith-techempower merged commit 5afdeb8 into TechEmpower:master Jul 19, 2022
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

Successfully merging this pull request may close these issues.

2 participants