From 7c8d310ed9cca30acb6402c421922ff13682eb1d Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 5 Nov 2023 14:31:20 +0800 Subject: [PATCH] Some debugging if this actually runs --- src/app.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app.jsx b/src/app.jsx index 31e9729..26b5d1a 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -86,6 +86,7 @@ window.__STATES_STATS__ = () => { setInterval(() => { if (!window.__IDLE__) return; const { statuses, unfurledLinks } = states; + let keysCount = 0; for (const key in statuses) { try { const $post = document.querySelector(`[data-state-post-id~="${key}"]`); @@ -100,9 +101,13 @@ setInterval(() => { break; } } + keysCount++; } } catch (e) {} } + if (keysCount) { + console.info(`GC: Removed ${keysCount} keys`); + } }, 15 * 60 * 1000); // Preload icons