Skip to content

blog: A Faster Electron#1138

Draft
MarshallOfSound wants to merge 4 commits into
mainfrom
sam/a-faster-electron-blog
Draft

blog: A Faster Electron#1138
MarshallOfSound wants to merge 4 commits into
mainfrom
sam/a-faster-electron-blog

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Member

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

  • Part one: startup — moving the sandboxed renderer off synchronous IPC (#51602), a build-time V8 code cache for the electron/js2c/* framework bundles (#51697), and a Node.js startup snapshot for the browser process (#51703).
  • Part two: compiler optimization — enabling ThinLTO --lto-O2 and replacing Chrome's PGO profiles with Electron-trained ones (#51669 / #51809 / #51812 / #51815).
  • Ten theme-responsive SVG diagrams (light/dark variants via 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.
  • Wider blog TOC: the right sidebar goes from col--2 (~190 px, wraps almost every heading) to 20%, with the post column giving up the difference.

Draft because

  • The electron/electron PR stack it describes hasn't fully landed yet; publish date should match the release that ships it.
  • A few numbers are pending final benchmark runs (browser-process startup ms pair is derived from the measured percentage; noted in the hero footnote).

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.
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jun 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addeddocusaurus-plugin-image-zoom@​3.0.1981009082100

View full report

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jun 3, 2026

Deploying electron-website with  Cloudflare Pages  Cloudflare Pages

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

View logs

Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
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' }} />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md Outdated
Comment thread blog/a-faster-electron.md
<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.
Copy link
Copy Markdown
Member

@mitchchn mitchchn Jun 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants