Electron packages a web application as desktop software by bundling Chromium and Node.js. Interfaces use HTML, CSS, and JavaScript, while Node.js APIs provide native-system access. This lets web-focused teams build cross-platform desktop applications without moving their UI work into C++. section 5.2.3
The bundled runtime is also Electron's central cost. An application includes a complete browser engine, adding more than 100MB to its size and typically using 200–300MB of idle memory. That overhead can mean battery drain or system slowdown when several always-open desktop applications compete for resources. section 5.2.3 section 8.4
Treat Electron performance as work across startup, rendering, memory, and distribution rather than as a final cleanup task:
- Reduce shipped JavaScript and unnecessary work; VS Code cut shipped JavaScript by 20% with targeted name mangling, alongside optimization of startup, rendering, and memory paths. section 5.2.3
- Virtualize long lists and debounce expensive operations so interface work does not grow directly with visible data or repeated input. section 5.2.3
- Profile the browser process for the specific window that drops frames, because each Electron window runs in its own browser process. section 7.4.3
- Separate the framework from application code and assets when analyzing installer growth, then make artifact size a release concern. section 8.4
Memory diagnosis must cover both sides of the application boundary. Removed page elements remain live when JavaScript still references them, and backend message handlers can retain processed data. Event listeners added in the Node.js backend but never removed create steady memory growth. Browser developer-tool memory snapshots with the Detached filter identify browser-side leaks; Node.js snapshots through --inspect cover the backend. section 7.4.1
Installer growth as an operational problem
A Windows Electron project-management installer reached 420MB. Enterprise customers reported deployments taking hours across internal networks, and the size issue surfaced in business reviews and renewal discussions. The investigation began by distinguishing Electron's framework footprint from the application's code and assets. section 8.4
