From e0766fc2c829b51728e16a587b68d13bd34c3bd9 Mon Sep 17 00:00:00 2001 From: kunish Date: Tue, 19 Sep 2023 20:27:48 +0800 Subject: [PATCH] perf(overview): shrink the data size every minute, closes #234 --- src/pages/Overview.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Overview.tsx b/src/pages/Overview.tsx index d43d826..7a8026e 100644 --- a/src/pages/Overview.tsx +++ b/src/pages/Overview.tsx @@ -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, )