Improvement/avoid loading proxy relations data - #5
Open
gacek85 wants to merge 3 commits into
Open
Conversation
- moved method call that loaded redundand proxied item data when it was not needed; method moved from outside into if statement scope
additional performance improvement
gacek85
commented
Mar 6, 2024
| $isFullRelation = $this->fieldHelper->getConfigValue($entityName, $fieldName, 'full', false); | ||
| $isPersistRelation = $this->databaseHelper->isCascadePersist($entityName, $fieldName); | ||
|
|
||
| $searchContext = $this->generateSearchContextForRelationsUpdate( |
Author
There was a problem hiding this comment.
execution of this method causes populating of search context and lazy load proxy for certain properties for all tterated relations - even if the relation entity does not exist. Moving the execution into the if statement AND even deeper into the condition when only the relation exists speeds up the execution very much. It will not be noticible for schemas with ~200 attributes, although for bigger product attributes counts with big set of relations - this is a massive improvement.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.