Skip to content

Commit

Permalink
TASK: Load contentGraph once
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed Oct 24, 2024
1 parent fc50036 commit bbf744c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/ContentRepository/Service/WorkspaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class WorkspaceService
public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepositoryId $contentRepositoryId): array
{
$contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId);
$contentGraph = $contentRepository->getContentGraph($workspaceName);
$pendingChanges = $this->workspacePublishingService->pendingWorkspaceChanges($contentRepositoryId, $workspaceName);
/** @var array{contextPath:string,documentContextPath:string,typeOfChange:int}[] $unpublishedNodes */
$unpublishedNodes = [];
Expand Down Expand Up @@ -92,7 +93,7 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
}

foreach ($originDimensionSpacePoints as $originDimensionSpacePoint) {
$subgraph = $contentRepository->getContentGraph($workspaceName)->getSubgraph(
$subgraph = $contentGraph->getSubgraph(
$originDimensionSpacePoint->toDimensionSpacePoint(),
VisibilityConstraints::withoutRestrictions()
);
Expand Down

0 comments on commit bbf744c

Please sign in to comment.