-
Notifications
You must be signed in to change notification settings - Fork 29
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
IBX-8019: Added performance consideration notice to LocationService::loadLocationChildren
#407
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webhdx
force-pushed
the
IBX-8019-Object-state-performance-regression
branch
from
May 28, 2024 14:14
f468ba0
to
33627b3
Compare
webhdx
force-pushed
the
IBX-8019-Object-state-performance-regression
branch
from
May 29, 2024 06:24
33627b3
to
99a6d34
Compare
Quality Gate passedIssues Measures |
webhdx
changed the title
IBX-8019: Replaced multiple
IBX-8019: Added performance consideration notice to May 29, 2024
JOIN
statements with SELECT ... IN
query in ObjectStateId CriterionLocationService::loadLocationChildren
2 tasks
webhdx
added
Improvement
Changes not fixing or changing behavior
Ready for review
labels
May 29, 2024
alongosz
approved these changes
May 29, 2024
konradoboza
approved these changes
May 29, 2024
adamwojs
approved these changes
May 29, 2024
6 tasks
Nattfarinn
approved these changes
Jun 3, 2024
ciastektk
approved these changes
Jun 3, 2024
ViniTou
approved these changes
Jun 3, 2024
tomaszszopinski
approved these changes
Jun 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA approved on IbexaDXP exp 3.3.37.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v3.3
#401 fixed the issue but some performance related issues became apparent. Due to current database schema shape we cannot provide further optimizations. In cases where there are many children, the query has to fetch all records and join version and language tables. This becomes even worse when Permission criterions are applied adding even more JOINs to the query. Test example from the ticket causes 100000 locations to be loaded which is necessary to perform location sort. This is where majority of query time comes from.
The recommendation is to use
SearchService::findLocations
instead ofLocationService::loadLocationChildren
where possible. I've added a notice to the method in order to warn people about potential performance issues.Existing
\eZ\Publish\Core\QueryType\BuiltIn\ChildrenQueryType
can be used instead of manually creating the query for SearchService.Related PRs:
LocationService::loadLocationChildren
#407LocationService::loadLocationChildren
use withSearchService
ezplatform-admin-ui#2119SearchService::findLocations
ezrecommendation-client#114Checklist:
$ composer fix-cs
).@ezsystems/engineering-team
).