Skip to content

Commit bbf744c

Browse files
committed
TASK: Load contentGraph once
1 parent fc50036 commit bbf744c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Classes/ContentRepository/Service/WorkspaceService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class WorkspaceService
5252
public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepositoryId $contentRepositoryId): array
5353
{
5454
$contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId);
55+
$contentGraph = $contentRepository->getContentGraph($workspaceName);
5556
$pendingChanges = $this->workspacePublishingService->pendingWorkspaceChanges($contentRepositoryId, $workspaceName);
5657
/** @var array{contextPath:string,documentContextPath:string,typeOfChange:int}[] $unpublishedNodes */
5758
$unpublishedNodes = [];
@@ -92,7 +93,7 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
9293
}
9394

9495
foreach ($originDimensionSpacePoints as $originDimensionSpacePoint) {
95-
$subgraph = $contentRepository->getContentGraph($workspaceName)->getSubgraph(
96+
$subgraph = $contentGraph->getSubgraph(
9697
$originDimensionSpacePoint->toDimensionSpacePoint(),
9798
VisibilityConstraints::withoutRestrictions()
9899
);

0 commit comments

Comments
 (0)