mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Store summary without memoization
This commit is contained in:
parent
9e9d8a3ce5
commit
49581738bb
1 changed files with 5 additions and 5 deletions
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue