Windows App Performance: 154 PRs of Fixes

Laptop running Windows with a chart showing Windows app performance gains

Windows app performance suffers when software is built and tested mostly on MacBooks, and a set of 154 public pull requests shows how much that costs. The changes, 136 of them merged, touched Electron, OpenCode, Rune, Cap, Hex, Bun and Strobe. Their measurements show that operations that are free on a MacBook Air can stall a $6,000 Windows laptop for five seconds.

The pattern behind many of them: dev tools get built on Macs, Windows gets a green CI check, and the app ships. Subsystem costs do not scale the same way across platforms.

Defender and file scanning

Microsoft Defender produced some of the largest gaps. A single 163 MiB signed executable took 5,542 ms to first frame on the test laptop. Splitting it into a 0.35 MiB launcher built with /Brepro and a static version resource cut CI first frame to 1,768 ms, and to 184-321 ms across four launches once the launcher had been seen before. Signed updates and SmartScreen were not tested.

Other findings in this group:

  • Spawning a helper with CREATE_SUSPENDED and ending it during a 1.5-second pause moved Defender work off the next click, dropping first frame from 525 ms to 49 ms median over 10 pairs.
  • The electron-store library writes a temp file and renames it. When Defender or Windows Search Indexer holds the file, retries can spin up to 1,000 ms per failed write, which showed up as 3-5 second freezes on tab close. Moving eight storage operations to a write-behind SQLite WAL cut main-thread median time from 41.88 ms to 9 microseconds.
  • Leaving a half-downloaded libcef.dll open at exit pushed cleanup into kernel teardown and burned 6.45 seconds off-CPU in one trace. Cancelling and waiting for the close cut next-build first frame from 2,032 ms to 224 ms median.

Benchmarking in an excluded dev folder hides all of this, so test signed downloads in a normally scanned location.

GPU and graphics costs

Cap’s wgpu DX12 path defaulted to the legacy FXC compiler. Bundling Microsoft’s DXC cut composite pipeline creation from 26,207 ms to 255 ms, about 103 times faster on an RTX 3080 Ti Laptop, with no shader changes.

The Electron fix is the best known. ElectronBrowserClient never implemented GetGrShaderDiskCacheDirectory(), so every Skia shader was dropped, causing 31 of 31 shader cache misses and about 480 ms of GPU-thread compile time on Iris Xe. A 37-line upstream fix saves roughly 400 ms on repeat launches in the demo app once apps ship a fixed Electron.

Adapter choice matters too. Three hidden swapchains on a display-less AMD iGPU forced cross-adapter presentation and spawned 111 NVIDIA threads. Choosing a display-driving GPU and smaller allocation blocks cut Hex from 584 MB to 229 MB private memory. In tray apps, dropping an idle Direct3D 12 device cut Hex from 229 MB to 51 MB private and freed 219 MB of VRAM. Checking DXGI descriptions before initializing every adapter cut adapter selection from 1,065 ms to 54 ms and first frame from 1,217 ms to 205 ms.

Timers, tray apps and Windows app performance in processes

Windows timers wake roughly every 15.6 ms by default. A 100-microsecond sleep in Cap’s GPU readback loop capped a 1572×1080 export at 55 fps. Scoping timeBeginPeriod(1) to the export dropped it from about 99.5 seconds to roughly 31 seconds, or 224 fps.

Hidden Tauri and WebView2 windows can stay “visible” to the page. On Cap 0.5.9, window.hide() left document.visibilityState at visible, so camera polling kept running in the tray and reached 3,345 threads and 3.43 GB of private memory after more than four hours.

CreateProcess is also not fork(). Per-file git calls on 257 untracked files meant 783 processes, and consolidating them cut that to 17 and the run from about 28-34 seconds to roughly a third of a second. Launching a 240 MB CLI just to print its version cost about 380 ms warm and around three seconds after an update under Defender, so shipping a version file beside it is cheaper.

Updates, NTFS and Win32 traps that hurt Windows app performance

OpenCode’s 236 MB installer took 11.8 seconds to restart when the app was already closed. Unpacking in the background and swapping folders cut restart to 1.4 seconds. A binary delta shrank an update from 68.75 MB to 13.75 MB, an 80 percent drop. Calling FlushFileBuffers during setup brought a first –version call down from over a second to 17-24 ms.

Smaller traps appear throughout the set. Windows can reserve blocks of local ports, including 49292-49391, so binding to a fixed port in that range fails even when nothing is listening. Mixed-DPI monitors can blow a 2560×1440 overlay up to 3840×2160. Right Alt on AltGr layouts can arrive with a synthetic Left Ctrl, so apps should not claim @ or the euro sign as shortcuts.

What teams can do next

The practical advice is to profile on real Windows hardware, with Defender on and caches cold. Teams can hand the full list to a coding agent for an audit, or run before-and-after checks with the Strobe tool. The numbers come from different apps and machines, so each is a controlled comparison rather than a universal benchmark.

Source: lukeparker.dev

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.