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

Improvement/avoid loading proxy relations data #5

Open
wants to merge 3 commits into
base: 5.1
Choose a base branch
from

Conversation

gacek85
Copy link

@gacek85 gacek85 commented Mar 6, 2024

No description provided.

dxops and others added 3 commits December 27, 2023 13:14
- 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
@@ -39,13 +39,6 @@ protected function updateRelations($entity, array $itemData = null)
$isFullRelation = $this->fieldHelper->getConfigValue($entityName, $fieldName, 'full', false);
$isPersistRelation = $this->databaseHelper->isCascadePersist($entityName, $fieldName);

$searchContext = $this->generateSearchContextForRelationsUpdate(
Copy link
Author

@gacek85 gacek85 Mar 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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