Dirty little Electron secret tanks macOS 26 performance

Apple's bad QA or poor coding by developers?

The Electron team has fixed code that caused system-wide slowdowns on the newly released macOS 26 "Tahoe."

Electron is a widely used framework for creating cross-platform applications using web technology. Applications using Electron include Microsoft's Visual Studio Code, pgAdmin for PostgreSQL management, Podman Desktop, Slack, Cursor, AWS Kiro, Theia IDE, and many more.

A fix committed last week removed an override of a private method in the Cocoa API, called _cornerMask. According to the author of the fix, the method calculates the shadow of the window, and overriding it "forces WindowServer to repeatedly recalculate and repaint the shadow." The likely reason the problem appeared only after the release of Tahoe is a new optimization, which this override then broke.

The commit which removes a call to a private method in Electron

The commit that removes a call to a private method in Electron

In Apple's naming conventions, methods starting with an underscore character are private and not intended for external developers to use.

The consequence for users is poor performance, particularly when multiple Electron-based applications are running. This issue, combined with another relating to password AutoFill that can cause slow scrolling in Chrome and Chromium-based applications, means that some early Tahoe adopters have had a bad experience.

Developers using the Rust-based Zed editor have also had Tahoe issues related to changes in AutoFill, the culprit being the same component that affected Chromium, a component called NSAutoFillHeuristicController.

Apple has updated Tahoe to 26.01 in the last few days, which reportedly improves the AutoFill issue, though not completely for Chromium.

Issues with Electron are problematic since although the team has backported fixes to versions from 36 on (the current version is 39), this still requires application developers to rebuild and deploy using the fixed version. A script to list Electron apps along with their versions may be illuminating, showing both how many installed applications are Electron-based and how many are out of date.

Does the blame lie with Apple for breaking popular applications, or with developers such as those behind Electron for calling a private method? It is not clear-cut. Microsoft, for example, has on many occasions put code into Windows specifically to avoid issues with particular applications when the operating system is upgraded.

"Electron's _cornerMask override was a dirty hack that was made in an effort to fix an ancient issue with corner smoothing," said the developer who updated the code, while another argued that Apple "stopping developers from addressing shadowing issues in a custom manner with this kind of performance penalty is irresponsible at best … to me this falls into the 'terrible QA' category."

There are workarounds for both the Electron and Chromium issues, one of which is to disable macOS AutoFill completely.

Another solution is to defer the macOS upgrade for a few months, allowing time for Apple to fix bugs and for developers to update their applications. ®

More about

TIP US OFF

Send us news


Other stories you might like