From bb13845773ae810ecb27d64e62c77ff9395cface Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 26 Jun 2023 12:10:35 +0700 Subject: [PATCH] Added future perf oprimization note refs https://github.com/TryGhost/Ghost/pull/17065/files/1bc2a604c3cdf80a1de3ceacd1484fa2df0616a3#r1239780571 --- ghost/collections/src/CollectionsService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/collections/src/CollectionsService.ts b/ghost/collections/src/CollectionsService.ts index 8b2975cce2..1a044a93a6 100644 --- a/ghost/collections/src/CollectionsService.ts +++ b/ghost/collections/src/CollectionsService.ts @@ -212,6 +212,7 @@ export class CollectionsService { } private async removePostFromAllCollections(postId: string) { + // @NOTE: can be optimized by having a "getByPostId" method on the collections repository const collections = await this.collectionsRepository.getAll(); for (const collection of collections) {