mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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 {
|
export class KindList extends PaginatedList {
|
||||||
constructor({
|
constructor({
|
||||||
list,
|
list,
|
||||||
|
|
@ -43,12 +44,11 @@ export class KindList extends PaginatedList {
|
||||||
baseRoute = makeKindEndpoint({ kindSlug: this.kindSlug })
|
baseRoute = makeKindEndpoint({ kindSlug: this.kindSlug })
|
||||||
|
|
||||||
makeSummary () {
|
makeSummary () {
|
||||||
return getListSummaryNumbers({
|
// console.log( `Summary run ${ timeSummaryRun += 1 } times` )
|
||||||
list: this.list,
|
return getListSummaryNumbers( this.list )
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
summary = memoize( this.makeSummary.bind( this ) )
|
summary = this.makeSummary()
|
||||||
|
|
||||||
get routes () {
|
get routes () {
|
||||||
return this.pages.map( kindPage => {
|
return this.pages.map( kindPage => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue