From 49581738bbb0b38a5acf50b4f9f496684d5e7c88 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sun, 22 May 2022 10:42:42 -0500 Subject: [PATCH] Store summary without memoization --- helpers/api/kind.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/api/kind.js b/helpers/api/kind.js index eeadaac..55a6137 100644 --- a/helpers/api/kind.js +++ b/helpers/api/kind.js @@ -28,7 +28,8 @@ function makeKindFilePath ({ kindSlug, number }) { } -// This may provide better performance via memoization +// let timeSummaryRun = 0 + export class KindList extends PaginatedList { constructor({ list, @@ -43,12 +44,11 @@ export class KindList extends PaginatedList { baseRoute = makeKindEndpoint({ kindSlug: this.kindSlug }) makeSummary () { - return getListSummaryNumbers({ - list: this.list, - }) + // console.log( `Summary run ${ timeSummaryRun += 1 } times` ) + return getListSummaryNumbers( this.list ) } - summary = memoize( this.makeSummary.bind( this ) ) + summary = this.makeSummary() get routes () { return this.pages.map( kindPage => {