pimcore / admin-ui-classic-bundle

Other
7 stars 93 forks source link

treeGetChildrenByIdAction has n+1 select issues #627

Open cancan101 opened 1 month ago

cancan101 commented 1 month ago

Accessing treeGetChildrenByIdAction (/tree-get-children-by-id) exhibits n+1 select behavior: Using data from Sentry: image The query handed to https://github.com/pimcore/admin-ui-classic-bundle/blob/7999ef435d84f133d469539b5664c6b1d65c176e/src/Controller/Admin/TagsController.php#L155-L182

looks to load lazily. something like may address the issue: https://www.doctrine-project.org/projects/doctrine-orm/en/3.2/reference/working-with-objects.html#by-eager-loading

kingjia90 commented 1 month ago

Thank you for reporting! I've opened 2 PRs that may help decreasing these queries, please see https://github.com/pimcore/pimcore/pull/17390 and https://github.com/pimcore/admin-ui-classic-bundle/pull/629

Could you please apply the changes and re-run Sentry to see if there's an improvement? Thank you in advance