1
0
Fork 0

Some debugging if this actually runs

This commit is contained in:
Lim Chee Aun 2023-11-05 14:31:20 +08:00
parent 5a4f1fb686
commit 7c8d310ed9

View file

@ -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