Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #13576 [Catalog Promotion] Select more data during processin…
…g to avoid inefficient db calls (lchrusciel) This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.11 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | | License | MIT With the proposed changes, we are omitting the n+1 problem. The idea is to load all data required for CP processing in one batch, so we can drastically reduce the number of DB queries(in the cost of computation memory, but it can be neglected, as still the biggest problem of it is that we do not clear UnitOfWork) I've also adjusted alias of query builder to `o`, as this is Sylius default Ref. https://blackfire.io/profiles/compare/3d7cc083-575f-4e58-acba-e2f60f444cbc/graph <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- cab253a [Catalog Promotion] Select more data during processing to avoid inefficient db calls
- Loading branch information