perf(overview): shrink the data size every minute, closes #234

This commit is contained in:
kunish 2023-09-19 20:27:48 +08:00
parent 4cc5eeb01f
commit e0766fc2c8
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -42,8 +42,8 @@ export default () => {
setMemories((memo) => memo.slice(-CHART_MAX_XAXIS))
})
},
// we shrink the chart data array size down every 10 minutes to prevent memory leaks
10 * 60 * 1000,
// we shrink the chart data array size down every minute to prevent memory leaks
60 * 1000,
setInterval,
)