From c88c39759cb12c701314e541a8ae499e6f70bfca Mon Sep 17 00:00:00 2001 From: Maciej Kobus Date: Fri, 7 Jun 2024 10:02:10 +0200 Subject: [PATCH] IBX-8019: Added performance consideration notice to `LocationService::loadLocationChildren` (#407) For more details see https://issues.ibexa.co/browse/IBX-8019 and https://github.com/ezsystems/ezplatform-kernel/pull/407 --- eZ/Publish/API/Repository/LocationService.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eZ/Publish/API/Repository/LocationService.php b/eZ/Publish/API/Repository/LocationService.php index 4bc04347ec..e8af6dbc4b 100644 --- a/eZ/Publish/API/Repository/LocationService.php +++ b/eZ/Publish/API/Repository/LocationService.php @@ -97,6 +97,10 @@ public function loadLocations(ContentInfo $contentInfo, ?Location $rootLocation /** * Loads children which are readable by the current user of a location object sorted by sortField and sortOrder. * + * Use this method with caution. It performs heavy queries on the database. + * Consider using {@see \eZ\Publish\API\Repository\SearchService::findLocations()} with + * {@see \eZ\Publish\Core\QueryType\BuiltIn\ChildrenQueryType} as an alternative. + * * @param \eZ\Publish\API\Repository\Values\Content\Location $location * @param int $offset the start offset for paging * @param int $limit the number of locations returned