mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
perf: visibility-gate dashboard render loop
Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
e07b7f2c06
commit
19af4dcba5
13 files changed
+140
-70
No files matched your search
@@ -814,11 +814,17 @@
|
||||
// Periodic TTL refresh
|
||||
// -----------------------------------------------------------------------
|
||||
refreshIntervalId = setInterval(() => {
|
||||
if (isAlive()) {
|
||||
if (isAlive() && !document.hidden) {
|
||||
renderLocks();
|
||||
}
|
||||
}, 30_000);
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (!document.hidden && isAlive()) {
|
||||
renderLocks();
|
||||
}
|
||||
});
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Event handlers
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user