blog: A Faster Electron#1138
Conversation
Two-part performance deep dive: startup work (sync-IPC removal, build-time V8 code cache for the framework bundles, Node.js startup snapshot for the browser process) and the compiler-optimization work (ThinLTO --lto-O2 and Electron-trained PGO profiles replacing Chrome's). Includes ten theme-responsive SVG diagrams.
- docusaurus-plugin-image-zoom: click-to-zoom lightbox for blog post images (linked images excluded so they navigate instead of zooming). - Widen the blog post table of contents from col--2 (~190px) to 20% so headings stop wrapping on every line; the post column gives up the difference.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Deploying electron-website with
|
| Latest commit: |
5d8cc36
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f98b35da.electron-website.pages.dev |
| Branch Preview URL: | https://sam-a-faster-electron-blog.electron-website.pages.dev |
| Over the last few releases we've been making Electron faster. Not one feature, and not one benchmark: startup, IPC, `contextBridge`, networking, module loading, and raw JavaScript throughput, across every app that runs on Electron. | ||
|
|
||
| <div> | ||
| <ThemedImage alt="Electron performance improvements. Startup: sandboxed renderer startup drops from about 230 ms to about 130 ms (about 43%); browser-process startup drops from about 125 ms to about 75 ms (about 40%). Everything after startup: Speedometer 3.1 on an M5 MacBook rises from 56.6 to 66.2 (about 17%); contextBridge calls are about 28% faster overall." sources={{ light: '/assets/img/blog/faster-startup-hero-light.svg', dark: '/assets/img/blog/faster-startup-hero-dark.svg' }} /> |
There was a problem hiding this comment.
Is there a public repo with benchmarks that folks can reproduce? Or maybe a repo with instructions on how to run a benchmark on your app?
There was a problem hiding this comment.
No these are all ad-hoc benchmarks, do you think they need to be committed somewhere? They're pretty trivial to make on the fly for specific things, I don't want to be maintaining a benchmark repo lol
| <ThemedImage alt="Electron performance improvements. Startup: sandboxed renderer startup drops from about 230 ms to about 130 ms (about 43%); main-process startup drops from about 125 ms to about 75 ms (about 40%). Everything after startup: Speedometer 3.1 on an M5 MacBook rises from 56.6 to 66.2 (about 17%); contextBridge calls are about 28% faster overall." sources={{ light: '/assets/img/blog/faster-startup-hero-light.svg', dark: '/assets/img/blog/faster-startup-hero-dark.svg' }} /> | ||
| </div> | ||
|
|
||
| The short version: sandboxed renderers start up ~43% faster, the main process boots ~40% faster, and Electron's compiled code got quicker across the board. Speedometer is up ~17%, `contextBridge` calls are up 28-50%, and networking is up 19-40%. You don't have to change a line of your app to get any of this. |
There was a problem hiding this comment.
Assuming you're referring to the Speedometer bench, it reads strangely in the middle of this list of internal framework improvements. (It's not an Electron component, and at the same time devs are more familiar with it so it deserves more of a highlight.)
How about putting it after the other stats as a more explicit punchline e.g.. "Electron now runs the Speedometer web benchmark 17% faster. And you don't have to change a line of your app to get any of this."
Summary
Adds the blog post "A Faster Electron" — a two-part deep dive into the performance work landing across the current PR stack in electron/electron, plus two small site improvements it relies on.
The post
electron/js2c/*framework bundles (#51697), and a Node.js startup snapshot for the browser process (#51703).--lto-O2and replacing Chrome's PGO profiles with Electron-trained ones (#51669 / #51809 / #51812 / #51815).ThemedImage).Site changes
docusaurus-plugin-image-zoom: click-to-zoom lightbox for blog images, so the diagrams are readable at full size. Linked images are excluded so they still navigate.col--2(~190 px, wraps almost every heading) to 20%, with the post column giving up the difference.Draft because