mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-27 07:34:12 +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…
x
Reference in New Issue
Block a user