From 80d32461d829e0a0a97a21f48c42f62ddb3aa395 Mon Sep 17 00:00:00 2001 From: KennyG Date: Mon, 30 Mar 2026 12:58:54 -0400 Subject: [PATCH] Increase foreground refresh interval in DownloadsService to reduce CPU usage during updates --- ui/src/app/services/downloads.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/app/services/downloads.service.ts b/ui/src/app/services/downloads.service.ts index 60d37bb..94d43c8 100644 --- a/ui/src/app/services/downloads.service.ts +++ b/ui/src/app/services/downloads.service.ts @@ -37,7 +37,7 @@ export class DownloadsService { configurationChanged = new Subject>(); updated = new Subject(); private updateRefreshScheduled = false; - private readonly foregroundRefreshMs = 250; + private readonly foregroundRefreshMs = 3000; private readonly backgroundRefreshMs = 30000; configuration: Record = {}; @@ -124,8 +124,8 @@ export class DownloadsService { // Coalesce high-frequency download progress events into a capped refresh rate. // requestAnimationFrame (~60fps) is smooth but expensive remotely and on large queues. // We trade a little smoothness for much lower CPU: - // - foreground: ~4fps - // - background: 1/30 seconds + // - foreground: 1 per 3 seconds + // - background: 1 per 30 seconds if (this.updateRefreshScheduled) { return; }