From 0925afb68905ec2d413b96b2064c8339d3b2b45f Mon Sep 17 00:00:00 2001 From: r-zakarya <82443831+r-zakarya@users.noreply.github.com> Date: Sat, 11 Jul 2026 18:32:14 +0100 Subject: [PATCH] perf(autofill): keep WebView2 renderer responsive while in tray Add --disable-renderer-backgrounding / -backgrounding-occluded-windows / -background-timer-throttling to the WebView2 args. Without them Chromium freezes a hidden renderer, so the first autofill hotkey after a tray-only start (Start with Windows) waited 3-5s for onAutofillRequest to run. Co-Authored-By: Claude Opus 4.8 --- delphi-backend/UMainForm.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/delphi-backend/UMainForm.pas b/delphi-backend/UMainForm.pas index 33299e2..51651c5 100644 --- a/delphi-backend/UMainForm.pas +++ b/delphi-backend/UMainForm.pas @@ -1514,6 +1514,13 @@ initialization // Must be set BEFORE the TMS FNC WebBrowser instantiates its // CoreWebView2Environment, hence the unit initialization block. SetEnvironmentVariable('WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS', + // Keep the renderer responsive while the window is hidden in the tray. + // Without these, Chromium freezes/throttles a backgrounded renderer, so + // the first autofill hotkey after a tray-only start (Start with Windows) + // waits 3-5s for the renderer to wake before onAutofillRequest runs. + '--disable-background-timer-throttling ' + + '--disable-backgrounding-occluded-windows ' + + '--disable-renderer-backgrounding ' + '--disable-background-networking ' + '--disable-sync ' + '--disable-component-update ' +