12 ms·
Electron-based apps cause system-wide lag on macOS 26 Tahoe
- kccqzy 1y agohttps://github.com/electron/electron/issues/48311#issuecomment-3332181420 https://github.com/electron/electron/issues/48311#issuecomme... If this comment is to be believed, it's not Apple's fault. It's the apps mucking around with the internals of AppKit. This example just happens to illustrate two of my least favorite software engineering practices: (1) despite one piece of code making a method private, another piece of code still overrides it/modifies it/calls it, an affront to the idea of encapsulation; (2) a piece of code has different behavior depending on the identity of a function, contrary to the principle of extensionality.
- wk_end 1y ago"Not Apple's fault" is up for debate; even if Electron shouldn't be doing this, Apple arguably shouldn't be pushing out updates that cause issues with wide-swaths of software that users use regardless.
- tom1337 1y agoSo you're blaming because they've changed a private API which electron not only used, but also seemed to have patched?
- asqueella 1y agoNo, for "pushing out updates that cause issues [with very common software]".
- smashedtoatoms 1y agoAs a dev, if you use a private method, you've just taken ownership of the problem. I suggested to you in our contract not to do it, and that it would likely not be supported, and you did it anyway. Fix your shit, common software or not.
- asqueella 1y agoThis is what an Apple engineer could write in the electron's github issue if they refused to fix it. We're not discussing that, but that they have pushed an update without proper testing. You can see from the other comments that breakage is not limited to people using private methods.
- pavlov 1y agoThat’s the principle that prevented Windows from making any meaningful progress for the past three decades.
- wk_end 1y agoWhat? Windows made tons of progress while maintaining this principle and became the most popular operating system in the world. Are you trying to tell me that you believe the evolution of Windows from 1.0 all the way to 7 - the entire time trying to operate according to this principle - doesn't constitute meaningful progress? The recent stagnation of the OS has nothing to do with attempting to maintain backwards compatibility.
- acdha 1y agoIt’s true that they’ve made some progress but my work laptop running Windows 11 still has UI elements from Windows 95/NT 4. The file system hasn’t improved since then and the keyboard responsiveness is actually worse. BeOS on 90s hardware absolutely torches Windows 11 on things like UI responsiveness, ability to multitask without degrading UI performance, and the file system (not networking, of course, it wasn’t perfect). I think it’s fair to question whether the decisions around backwards compatibility have been worth the cost but I’d imagine they’re already doing that. Enterprise IT departments love Windows but nobody else does, and the generation of people who grew up using iOS/Android and macOS/ChromeOS for school aren’t going to jump at the chance to bring that enterprise IT experience into their personal lives.
- cyberax 1y agoYou can actually tell the old controls from the Win NT by how fast and responsive they are. They also properly follow the best practices by showing keyboard accelerators when you press "alt". It's the new stuff that is slow and unusable.
- 1718627440 1y agoAnd they also explain themself to the user. The new UI often doesn't tell you at all, what exactly you are modifying here, while the old often has paragraphs of explanation.
- cosmic_cheese 1y agoApple’s attitude here is that it’s an inherent risk of using private APIs, because it’s not something they want devs doing. They don’t facilitate it like MS tends to. Don’t touch the stove if you don’t want to get burnt.
- wk_end 1y agoThe person who's getting burnt is Random Officer Worker Joe, who just wants to run Slack and Spotify and who doesn't know a thing about Electron or private APIs, but knows that ever since upgrading their version of macOS things are running terribly. Apple's position is technically noble, but that doesn't help their users.
- cosmic_cheese 1y agoThe Electron maintainers should've considered that possibility before reaching for a private API. It's on the Electron's team's shoulders and nobody else's. If I were building a FOSS platform, I wouldn't give a second thought to third parties making use of my platform's private APIs. They're private for a reason, whether that be because they're not yet fully baked or because using them can have unintended consequences, they're not intended for public consumption. I especially wouldn't want somebody else's platform to depend on my private APIs, because I am then effectively locked into keeping that API frozen in time by the numerous others building on this other person's platform. It's generally poor practice to build upon such brittle things as under-the-hood tinkering anyway.
- Aaargh20318 1y ago> Apple's position is technically noble, but that doesn't help their users. The alternative doesn’t help either. That’s the approach Microsoft has taken and look what a mess Windows is because of it.
- viraptor 1y ago> what a mess Windows is because of it. Can you point at any part of windows being a mess specifically because of backwards compatibility?
- Aurornis 1y agoWe've had developer betas of macOS Tahoe since June. Standard practice for any mobile or desktop software is to start testing on the betas as soon as they're available. Unless this was a last-minute change before the final release, it's on the software developers to use the betas to prepare their software for upcoming releases.
- Tteriffic 1y agoExactly. Who you blame depends on if it was introduced in beta 1 or RC.
- cosmic_cheese 1y agoA good argument for allowing and working with minor platform differences instead of trying to micromanage every little aspect to force inter-platform consistency and/or perfect compliance with the mockup.
- x0x0 1y agoNah, it's Apple's fault. Not regression testing against major apps is pure incompetence. Also, this in the comment: > [a user] Please try any way of getting in touch with Apple engineers you can. As a project, we don't have a better connection to Apple than you do. > > One approach might be the engineer who replied to the Bluesky post that someone linked to above about the input issue. Pure incompetence. Major projects have no way to do anything but ping randoms on socials.
- bombcar 1y agoThis is downvoted, but it's true. It doesn't matter who's fault it is in some Aristotelean sense, what matters is the user upgraded to YOUR new OS, and now shit don't work. Raymond Chen and Microsoft got this, years ago. Joel talked about it. You make shit work, even if it's the software being a fuck.
- kridsdale3 1y agoNo time to do that when you need to re-do the entire UI of 100 apps for no good reason other than to make an iMac indistinguishable from an iPad.
- sgerenser 1y agoOr, as some OS maintainer once said: WE DO NOT BREAK USERSPACE! Seriously. How hard is this rule to understand? We particularly don't break user space with TOTAL CRAP.
- aw1621107 1y agoThis situation seems to be more analogous to an out-of-tree driver which reaches into kernel internals, which Linux does break all the time.
- mrheosuper 1y agoif the out-of-tree driver does not touch kernel space, it should not be broken.
- marcosdumay 1y ago> despite one piece of code making a method private, another piece of code still overrides it/modifies it/calls it, an affront to the idea of encapsulation That's inherent on the way current computers manage the memory. And I don't know if the gains are enough to pay for the loses of guaranteeing encapsulation. One could reach for static analysis, but that would imply some restrictions on the machine's assembly. Those are probably worth it. > a piece of code has different behavior depending on the identity of a function I have written my quota of "find the latest caller on the stack with property X, verify if it has access", on different languages. Some times a function can't in any way be just a function.
- btown 1y agoThere's also the good old use case of "am I dealing with a subclass that overrode the superclass's implementation of the method." How do you distinguish between a superclass that always returns null/noop, vs. a subclass that happened to return null in this specific case? Sometimes this is useful/vital for setting expectations to the user what functionality the instance is likely to have. Now, you could refactor everything to have the superclass's implementation either throw a NotImplementedError, or return a sentinel value... but changing every call site might be a gargantuan task. Similarly, adding static metadata to every subclass might not be feasible. But checking whether the function's (pre-bound) identity is different is a very easy hack! Ironically, this might indeed be exactly what Apple is doing here, and they're doing it in a tight loop.
- 1718627440 1y agoCouldn't you use isinstance(), which would not be a hack?
- btown 1y agoisinstance only tells you which subclass, not whether that subclass overrides the superclass implementation!
- ryandrake 1y ago
- SkiFire13 1y ago> (2) a piece of code has different behavior depending on the identity of a function, contrary to the principle of extensionality. Note that most definitions of extensionality don't consider the number of steps to achieve the result as an observable property, although in practice it is.
- snarfy 1y agoIt's all pretty terrible. For problem (1) why does the language allow it? And why are they doing it this way? Did Apple not provide an official way?
- cosmic_cheese 1y agoWith Objective-C's nature as a dynamic language, there's no way to make APIs fully private and unusable to third parties. Despite heavily embracing Swift in recent years, much of AppKit and UIKit are still written in Objective-C.
- cyberax 1y agoAbuse of private APIs means that your public API is incomplete. And that people dislike how your system behaves so much, that they're willing to muck with its internals.
- stalfosknight 1y agoNo, it means some people are doing it wrong either because: 1. They don't know how to do it the right way or 2. They can't be bothered to do it the right way #1 I can understand. We all make mistakes as we learn and grow as developers. #2 is just arrogance / laziness on the part of the developer. Compounding it by blaming the platform owner that clearly and explicitly told you not to go that route is gross.
- cyberax 1y ago[flagged]
- stalfosknight 1y agoI'll grant that their documentation isn't the best I've ever seen, but it is still on you if you reach for private APIs. Again, that is consciously choosing a shortcut you've been explicitly told not to use.
- epistasis 1y agoFrom the bug report: > It turns out Electron was overriding a private AppKit API (_cornerMask) to apply custom corner masks to vibrant views. > ... > By removing the custom _cornerMask override and associated logic, we allow AppKit to handle shadows with its default pipeline. This resolves the GPU spike while retaining shadows as expected. I'd say that most often usage of private APIs is because: 4. it probably shouldn't be done at all
- merlindru 1y agoI don't know what the comment you're replying to said, but further down the thread: > Electron's "_cornerMask" override was a dirty hack that was made in an effort to fix an ancient issue with corner smoothing. So Electron used this private API to fix an issue that shouldn't have existed at all, as far as I can tell
- 1718627440 1y ago> (1) despite one piece of code making a method private, another piece of code still overrides it/modifies it/calls it, an affront to the idea of encapsulation; That's why its a good idea to strip a symbol or provide a linker script. This way you can also properly version the code.
- Zanfa 1y agoTo be fair, AppKit is buggy/undocumented enough that you need to muck with the internals even for trivial things.
- tyteen4a03 1y agoReminds me of this line of code where Apple included a symbol just to please an app (which happens to be WeChat, the largest IM app in China): https://github.com/apple-oss-distributions/libmalloc/blob/13aaf4cb0a58d49bf649743e1406e64a573ad944/private/make_tapi_happy.h#L110 https://github.com/apple-oss-distributions/libmalloc/blob/13...
- huijzer 1y agoDon't Electron-based apps cause lag on basically any system?
- GuinansEyebrows 1y agoPerhaps, but this specific case appears to be related to (ab)use of a private API on Electron's part. https://github.com/electron/electron/issues/48311#issuecomment-3332181420 https://github.com/electron/electron/issues/48311#issuecomme...
- nkozyra 1y agoI know it's a defacto complaint to leverage against Electron apps, but memory usage notwithstanding, I've never run into much lag issue on any major Electron app.
- ToucanLoucan 1y agoIt depends. Numerous times when internet is spotty Slack and Discord both on different occasions have brought my systems to a halt until they can complete whatever task is stuck waiting (or I force close them). It's really fucking obnoxious that somehow a goddamn web app in a wrapper is managing to cause system wide hangs.
- Vilian 1y agoTrue, i'm gonna start limiting electron apps CPU and IO percentage to not halt everything
- nsriv 1y agoI think that's probably a recipe to hit the limits more often and end up being more frustrating, depending on your hardware.
- 1718627440 1y agoCan't you interrupt them (aka SIGSTOP) instead? Then you could resume them, instead of reopening them and potentially using state.
- schmidtleonard 1y agoDiscord and VSCode work smoothly for me on an M4 MBP -- not sure if it's a compatibility difference or just performance hiding the problem, though. But Spotlight file search is completely broken, rebuilding the index doesn't help, and web results are the only thing it returns. After 20 years of intense research, Apple finally caught up to Microsoft in race to make search broken and useless.
- jama211 1y agoSearch works great for me, I’m sorry it broke on your machine but it needs to be broken for everyone to be on Microsoft’s level
- schmidtleonard 1y agoHaha fair enough, and now it's fixed on my machine but Windows Search is still asking if you'd like Bing with that.
- jama211 1y agoHahaha always with the bing
- navigate8310 1y agoIt's funny, bing literally means disease in Mandarin.
- duskwuff 1y ago> But Spotlight file search is completely broken, rebuilding the index doesn't help, and web results are the only thing it returns. I had the same issue; killing Spotlight processes fixed it. (A reboot would probably do the job too.)
- schmidtleonard 1y agoHey it worked. Thanks! (Killing the process, ofc)
- efitz 1y agoI was just noticing the stuttering and lag but I hadn’t tracked it down to electron yet.
- OGEnthusiast 1y agoFWIW haven't experienced this at all on an M4 Max (with Slack and VSCode open).
- Etheryte 1y agoTo be fair, the M4 Max is such a beefy machine that you could do a lot of things wrong and still not notice it.
- OGEnthusiast 1y agoTrue, but looking at Activity Monitor I don't see any CPU or GPU spike when having an Electron app open and scrolling in Chrome (vs scrolling without any Electron apps open)
- STRML 1y agoWatch your power usage. With large windowed VSCode or Cursor, you will see far higher CPU and GPU usage by WindowServer and more system power consumption. It’s easier if you track it with stats.app.
- masklinn 1y agoApparently the issue has to do with transparencies (shadows and straight up transparency), so could be a question of capabilities not capacity e.g. older gens have less range and some non-default require falling back to software whereas newer gens can keep to hardware.
- bdash 1y agoStrangely the WindowServer issue is a constant issue on my personal MacBook Pro, but I've never seen it on my identical work MacBook Pro. It seems like there's some other factor that is necessary to trigger the problem.
- deleted 1y ago[deleted]
- torben-friis 1y agoI’m surprised to see so little pushback in press to iOS/macOS 26. I’ve been part of the public beta and it’s been so weird going from “this sucks but it’s a first beta” through “it really isn’t improving much as time goes by” to “we’re a week from launch, there’s no way they release this after the Apple Intelligence fiasco”. And yet here we are. Performance issues, ui inconsistencies and garish design everywhere.
- coolspot 1y agoYeah, screen time for kids is absolutely broken in iOS 26.
- Fwirt 1y agoI'm glad I'm not the only one experiencing this. They absolutely destroyed Guided Access in iOS 26 to the point of borderline non-functionality. I've had the system idle-sleep while in Guided Access and wake to a lock screen that I was unable to interact with in any way, including turning off guided access. Softlocked my device for about 5 minutes until panicked swiping and button mashing managed to snap it out of it. There appears to be a race condition with the lock screen and home screen, if the device idle sleeps in guided access mode then about 50% of the time it wakes to the home screen instead of the app. Sometimes waking it on iOS shows the lock screen for a brief second before the app starts. Also, exiting guided access sometimes doesn't recolor the apps on the home screen so it still appears as if all apps are disabled. Not to mention that they reclassified the pen settings dialog as a "software keyboard" meaning that in order for my kids to draw with the Apple Pencil I also have to allow them to enter text now. None of these were issues on iOS 18.
- MBCook 1y agoI think you mean “since release”. Hasn’t it always had horrible problems? I’ve never heard a good thing about it in use.
- Fwirt 1y agoI used it from iOS 15-18 and it always worked great. We try to limit our kids' iPad use to drawing in Freeform and the occasional edutainment app, and I never had issues with them escaping Guided Access or it causing lockups. The fact that I can barely trust it to work properly on iPadOS 26 is a huge disappointment for me.
- altairprime 1y agoNotes from the Google bug tracker linked by the GitHub issue: applying this command to each Chrome/Chromium app impacting your system will workaround the underlying macOS resource leak (EDIT: which only occurs when Electron mucks with private APIs to fake having native UI): defaults write com.google.Chrome NSAutoFillHeuristicControllerEnabled -bool false https://issues.chromium.org/issues/446481994#comment17 https://issues.chromium.org/issues/446481994#comment17 That command’s equivalent is being patched into Chrome and will have to ripple downward into Electron apps; directing complaints to each electron app impacted with a link to the relevant Google issue workaround will give them sufficient data to mitigate it, if they bother to. Apple is already aware — https://x.com/ian_mcdowell/status/1967326413830472191 https://x.com/ian_mcdowell/status/1967326413830472191 (apologies for the Twitter link, but it’s an Apple employee). EDIT: Someone else has traced the issue to Electron messing with internal OS APIs! Courtesy of https://news.ycombinator.com/item?id=45377253 https://news.ycombinator.com/item?id=45377253 — > It turns out Electron was overriding a private AppKit API (_cornerMask) to apply custom corner masks to vibrant views. ps. This issue was discussed a week ago here: https://news.ycombinator.com/item?id=45292019 https://news.ycombinator.com/item?id=45292019 pps. Manually applying this workaround without scheduling its future removal has a slight but non-zero risk of someday breaking OS-linked autofill in your electron apps in weird or unexpected ways. ppps. I don’t work for anyone, school for another three years minimum.
- ThePowerOfFuet 1y ago>hxxps://x.com/ian_mcdowell/status/1967326413830472191 (apologies for the Twitter link, but it’s an Apple employee) https://xcancel.com/ian_mcdowell/status/1967326413830472191 https://xcancel.com/ian_mcdowell/status/1967326413830472191 FTFY :)
- altairprime 1y ago“And yet”, she persisted, “my apology remains necessary.”
- mikamika83 1y agoGPU load bug and Autofill bug are two separate, completely unrelated issues.
- nntwozz 1y agoI'm a simple man, I see Electron I don't install.
- reaperducer 1y agoAwesome if you're a one-man-band. Not awesome if you're in a large company where you have to communicate with others and don't get to choose the medium.
- deleted 1y ago[deleted]
- rvz 1y agoWell, that's...Electron for you. The most inefficient solution (in both space and time complexity) being suggested to build desktop apps is now shown to be causing widespread sluggishness. So much for interviewing developers for algorithms and data structures. Also Rust won't save you or make Electron faster either.
- IgorPartola 1y ago1. This is about a specific bug, not about Electron in general. 2. What better cross platform GUI alternative do you suggest?
- tcfhgj 1y agoanything which uses native code
- IgorPartola 1y agoHow would that be cross platform?
- tcfhgj 1y agoPlattform independent abstractions
- SBArbeit 1y agoAvalonia. https://avaloniaui.net/platforms https://avaloniaui.net/platforms
- ttoinou 1y agoThe most inefficient solution (in both space and time complexity) Those are not the only qualities / metrics to optimize for. Developer eXperience, cross platform, open standards, easy compatibility with websites, easiness to keep updated etc. can be far more important
- 1y ago
- c-hendricks 1y agoIt's not limited to Electron applications: https://github.com/neovide/neovide/issues/3225 https://github.com/neovide/neovide/issues/3225 Other Tahoe issues with non-Electron apps: https://github.com/zed-industries/zed/issues/33182 https://github.com/zed-industries/zed/issues/33182 https://github.com/wezterm/wezterm/issues/7255 https://github.com/wezterm/wezterm/issues/7255
- mrtesthah 1y agoThis might be the fix: https://github.com/ghostty-org/ghostty/pull/8625/commits/431364cf16a7619de7b6d193d28eda9605ebff7b https://github.com/ghostty-org/ghostty/pull/8625/commits/431...
- taroth 1y agoOne-liner for electron developers to fix the issue: browserwindow.setHasShadow(false)
- mikamika83 1y agoGPU load bug and Autofill bug are two separate, completely unrelated issues.
- c-hendricks 1y agoCorrect! That's why I listed them under "other". One seems to be their new SMS 2FA functionality causing high CPU usage, the other seems to be private window APIs causing high GPU usage.
- nateb2022 1y agofixed in: https://github.com/electron/electron/pull/48376 https://github.com/electron/electron/pull/48376
- bdash 1y agoThis affects some of the most widely used applications on the platform, including "productivity" applications such as Slack that Apple uses internally. How did no-one at Apple notice this and do something about it prior to macOS 26 being released?
- cosmic_cheese 1y agoI stopped using the Slack Electron wrapper as soon as Safari added support for "installing" web apps (File > Add to Dock…). Wouldn't be surprised if people within Apple did similar.
- bombcar 1y agoMind blown, this may actually be freaking useful ...
- c-hendricks 1y agoThis made me try it out again since the feature was first released. Looks like they added support for Safari extensions and content blockers to PWAs in macOS 15.0.
- bdash 1y agoI'd sorta hope they are testing widely-used applications in the way that typical end users will experience them before releasing a new OS version.
- kccqzy 1y agoI actually did that as soon as Safari added a pinned tab feature. I remember doing this as early as 2016.
- electric_muse 1y agoAnyone ever experience Zoom meeting lag that reproducibly connects with receiving a Mac notification? I've had this issue on my M1 and now my M4 mac for about a year now, and I can't figure it out. Uninstalling and reinstalling hasn't helped. Literally, someone can reliably send me a slack notification in a meeting (even when DND is on) and cause my Zoom outbound video to get gummed up. Edit: I ask because I wonder if it has to do with this.
- skfist 1y agoI started experiencing massive overheating issue on latest version of Zoom and on macOS 26 and now 26.1 beta as well. Haven't experienced what you're describing, it's really odd.
- trothamel 1y agoIt seems odd that Apple could release an update that breaks common software, and not go to the trouble of at least contacting the developers of the software and discussing the issue.
- cjk 1y agoBefore I left Apple ~10y ago, it was pretty common to drop linked-on-or-after hacks into AppKit and UIKit to keep popular software chugging along. Assuming they're still doing that sort of thing, this was either missed or deemed not high-enough priority to add such a check (or maybe one was added, and the only reason this issue has been noticed is because Electron and Electron apps are now being built against the macOS 26 SDK).
- OfflineSergio 1y agoJust imagine you are investigating a bug and everyone is trying to express their opnion on whose fault is this. What happened to not having a blaming culture?
- deleted 1y ago[deleted]
- wg0 1y agoIf I'm not wrong it affects VS code hence Cursor, Kiro etc. At least I notice fan going jet speeds with VSCode lately.
- system7rocks 1y agoHow difficult would it be just to switch to Swift for some of these apps?
- kridsdale3 1y agoYou're talking about adding at least $10M to the budget and a 2 year lead time for each of these companies.
- mobiledev2014 1y agoWithout question worth it for the big CO’s like salesforce (market cap $230B) and MS (market cap $4T)
- wiseowise 1y agoElectron haters are going to have a field day over this (obviously it's not an electron issue, but why they care?).
- urbandw311er 1y agoJoke’s on them, turns out that it is an electron issue.
- wiseowise 1y agohttps://news.ycombinator.com/item?id=45377917 https://news.ycombinator.com/item?id=45377917 It’s not.
- urbandw311er 1y agoAnother great reason not to have upgraded to macOS 26.
- alberth 1y agoThis was fixed in Chromium yesterday, credited to @mitchellh https://xcancel.com/mitchellh/status/1970944369336475713#m https://xcancel.com/mitchellh/status/1970944369336475713#m
- mikamika83 1y agonope, that has nothing to do with electron, completely separate
- mirthflat83 1y agoWow. I was wondering why SMS autofill wasn’t working on my Arc browser.
- taroth 1y agoOne-liner for electron developers to fix the issue: `browserwindow.setHasShadow(false)`
- inDigiNeous 1y agoThank you for this! Could possibly just hotpatch my existing app, add this to the packed in javascript .asar resource file and not having to make a new build with updated Electron version.
- rayiner 1y agoIndividuals used to make sophisticated native apps as shareware for $10 back in the 1990s and today big teams rely on crap like Electron. The enshittification of everything.
- inDigiNeous 1y agoWell, back in the day you had 4 megs of ram, MS-DOS and other OSes that are simple as they come, and full access to the hardware. These days if you want to support macOS, Windows, Linux: I say good luck to you, Electron can save you there. Electron is not crap, but many javascript developers are crap. You can make fast and memory efficient apps in Electron, if you know how to code. (Note: Slack or Discord developers don't have that skill)
- frays 1y agoWould never have imagined the day when using Chrome on my personal M3 Macbook would feel slower than my corporate Windows laptop. I shouldn't have updated to MacOS Tahoe on my Macbook knowing that it was a .0 release. They need to fix this ASAP.