mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
perf(overview): shrink the data size every minute, closes #234
This commit is contained in:
parent
4cc5eeb01f
commit
e0766fc2c8
@ -42,8 +42,8 @@ export default () => {
|
|||||||
setMemories((memo) => memo.slice(-CHART_MAX_XAXIS))
|
setMemories((memo) => memo.slice(-CHART_MAX_XAXIS))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// we shrink the chart data array size down every 10 minutes to prevent memory leaks
|
// we shrink the chart data array size down every minute to prevent memory leaks
|
||||||
10 * 60 * 1000,
|
60 * 1000,
|
||||||
setInterval,
|
setInterval,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user