Profiling an Electron App's Real Memory Hogs Before a Rust Rewrite

Discord's Rust rewrite took Windows memory from up to 4GB down to roughly 290MB. That number can be accurate and still tell you nothing about your Electron app. This is the profiling procedure to run before anyone on the team says the word "rewrite": what process.memoryUsage() actually measures, why a flat heap chart means you're looking at the wrong tool, per-process sampling with app.getAppMetrics(), per-renderer detail from the CDP Performance domain, a deterministic Playwright workload that makes two runs comparable, and the four numbers that decide the question — floor, warm-up peak, steady state and leak rate. Full write-up: https://hackyjs.com/posts/profiling-an-electron-apps-real-memory-hogs-before-a-rust-rewrite

electronrustmemory-profilingdesktop-appsperformance

Read the post →