gruber,
@gruber@mastodon.social avatar

Electron.

gruber,
@gruber@mastodon.social avatar

While I’m singing the praises of Electron apps, I should also praise the memory efficiency of Catalyst apps, especially Apple’s own. 1.5 GB for a single-window app.

harpaa01,
@harpaa01@mastodon.social avatar

@gruber Yeah but have you seen how smooth the News app is? I can resize windows and scroll at over a dozen frames per second.

arguementclinic,

@gruber I don’t know if it’s Electron app or not but Apple Maps Data is listed as taking up 17 gigs of data even though I’ve deleted the app. By any chance do you know how to get rid of this 17 gigs or why it’s persisting even after the app was fully deleted rather than being offloaded?

markv,
@markv@mastodon.social avatar

@gruber The main issue I have with Catalyst apps isn't so much the memory footprint, but that the UX for a lot of them is still pretty bad after a few years, and they often don't feel very at home on the Mac. Looking at you, Home 😡

agiletortoise,
@agiletortoise@mastodon.social avatar

@gruber To be fair, News might as well be Safari.

cohomologyisFUN,
@cohomologyisFUN@mastodon.sdf.org avatar

@agiletortoise @gruber why isn’t it?

I mean, why isn’t it a PWA, that just runs in Safari?

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@gruber Catalyst apps are native apps using native APIs, so whatever News is doing, I don't expect it would use any less with a different technology; it probably has a lot of WebKit going on, to be fair, and whatever you're caching

gurupanguji,
@gurupanguji@mastodon.social avatar

@stroughtonsmith @gruber fwiw a good comparison would be beeper against WhatsApp — similar use cases but with diff technologies.

poswald,
@poswald@mastodon.social avatar

@stroughtonsmith @gruber Also, having empty memory doesn't speed up your computer. It's there to be used. I wouldn't mind if my browser took up the entirety of memory to cache data as long as it drops it when the rest of the computer needs some. Also, the memory column includes memory shared across programs and can appear to be comically large even though real private mem usage is much lower.

gruber,
@gruber@mastodon.social avatar

@stroughtonsmith I know it's not the nature of Catalyst in and of itself to leak memory, but I think what happens is that apps written primary for iOS can get away with memory leaks because they get paged out in the background when necessary. They're not written to be running non-stop for days (or even weeks).

chockenberry,
@chockenberry@mastodon.social avatar

@gruber @stroughtonsmith They also end up in compressed memory (essentially paged out) or evicted entirely from memory with only a screenshot of the screen remaining (so you see something in the app switcher).

Most apps are written to take that into account, but on macOS, the model is different and an app's state is much more visible than the app switcher: it would be weird if the News app just randomly disappeared from the Dock, for example.

Gte,
@Gte@mastodon.social avatar

@chockenberry @gruber @stroughtonsmith If I recall there’s a MacOS thing you can opt into that tries to do a similar thing. Sudden App Termination? Napkin adopted it but it’s been years. There’s a state restoration mechanism too. I think Xcode does that when you shut down your Mac and it is running. You’ll see the window appear on relaunch but it’s a placeholder. The app comes up and takes its place later.

chockenberry,
@chockenberry@mastodon.social avatar

@Gte @gruber @stroughtonsmith Yeah that stuff always felt like it was bolted on and never saw wide adoption. (We both have faint memories of it!)

But for a framework like Catalyst it could make sense because it’s a similar need.

Gte,
@Gte@mastodon.social avatar

@chockenberry @gruber @stroughtonsmith Totally. I’m not even sure when they trigger that path on macOS anymore. It’s opt-in by the app so the OS holds all the cards on what happens. I’d guess the behaviour across the ecosystem was never good enough to press the idea much further. Catalyst apps could be a good candidate for ramping it up though.
That said if the window is on screen and they don’t restore it’s super weird behaviour. A) they shouldn’t leak. B) macOS contract with apps is lenient.

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@Gte @chockenberry @gruber (I think Catalyst apps opt into both by default)

Gte,
@Gte@mastodon.social avatar

@stroughtonsmith @chockenberry @gruber That’d make a lot of sense. Maybe the OS can be more aggressive with them. It knows they’re opted in and not AppKit apps. (Caveats apply obviously) So the policy can be a little more aggressive. But who know. Mostly apps shouldn’t leak and killing, even in a cute fashion, isn’t a real fix.

kocienda,
@kocienda@mastodon.social avatar

@gruber @stroughtonsmith I think you're mostly right here, except for the use of “paged out in the background”. The actual effect you're looking for would be “terminated in the background”, so that when the app comes back to the front, it's relaunched in a new process—thereby receiving, as we used to joke inside Apple, a fresh set of global variables. Paging back in would give you the old process and memory setup back, leaks and all. Maybe someone on Springboard can come correct me if I'm wrong.

bondo,
@bondo@mastodon.social avatar

@gruber @stroughtonsmith Back in the pre-Multitasking days (iPhoneOS 3, manual memory management), a fellow iPhone developer told me he never released any memory because he didn't understand it, and his app would only run for short periods of time 😅

gruber,
@gruber@mastodon.social avatar

@bondo @stroughtonsmith Does he work at Apple now on Apple News?

bondo,
@bondo@mastodon.social avatar

@gruber @stroughtonsmith He does work at Apple in Cupertino (but not on News :-)

mjtsai,
@mjtsai@mastodon.social avatar

@gruber @stroughtonsmith See also: Downcast for Mac.

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber Your point is correct but calling Catalyst apps native is the most weird thing.

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@helge @gruber …they are native? Catalyst is native to macOS and has been for six years now; it powers major system apps and system features

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber They are certainly not native. Yes a set of builtin apps (like Messages) use that zombie and that is awful.
What system features does it power?

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@helge @gruber …how do you personally define native? Because virtually the entire OS is Objective-C/Cocoa, so if you're writing Swift code it's all 'non-native’ 😅 That's a bolt-on runtime with a translation layer and non-native idioms.

If it emits native code, talks to the same system frameworks, and is used to build the system apps, it's ‘native’.

helge,
@helge@mastodon.social avatar

@stroughtonsmith @gruber For me native means that it follows the system UX conventions, UIKit is of course closer to that than say Electron, but it is still quite off. Just like you can easily tell an Electron you can usually tell a Catalyst app (eg via resizing behavior)
What language is being used doesn’t matter that much for me, a PyObjC Cocoa app can be perfectly sound.
An app using a different framework isn’t native 🤷‍♀️

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@helge @gruber a bad app is a bad app; I ain't got no problem with window resizing 😛 The simple fact is you likely have no idea you're using Catalyst apps until you come across a bad one, which is the way it should be. Either way, it’s still native, maybe even Apple’s /preferred/ native solution for system apps, considering it’s taken over a good 30–40% of them in just a few years 😉

video/mp4

Kevin,
@Kevin@doyle.boston avatar

@gruber so one New Yorker issue

helge,
@helge@mastodon.social avatar

@gruber Those memory comparisons are quite off really. There is nothing wrong with apps consuming all the memory available, it’s there, use it.
The key difference is what the memory is being used for, and for Electron that is largely just infra.

nickfoster,
@nickfoster@hachyderm.io avatar

@gruber running Beeper on my Mac causes all the fans to spin up to 100% until I kill the app… its unusable

gruber,
@gruber@mastodon.social avatar

@nickfoster It combines for over 100% of a CPU core here for me, idle, too. Texts is a much better behaved app -- lower memory use and nearly zero CPU when idle.

ocfountains,
@ocfountains@mastodon.social avatar

@gruber You should see Google Drive Desktop app. Brutal. And it gets stuck all the time, but Google seem to have no idea why, or how to fix the problem, so the only solution is to delete everything and reinstall. Crazy.

Jens_T,
@Jens_T@mastodon.social avatar

@gruber Electron is the new Java.

glyph,
@glyph@mastodon.social avatar

@gruber also electron?

glyph,
@glyph@mastodon.social avatar

@gruber also not electron?

I don't love electron either but the idea that you can't optimize an app's memory usage or helper process footprint with it is a bit silly. Maybe beeper is indeed not good, I haven't tried it, but this is like Gamers™ pointing at a "Unity" splash screen and saying it makes a game bad. You're confusing brand association for technical capability.

eb,
@eb@social.coop avatar

@glyph you were incredibly generous with xcode in this screenshot

glyph,
@glyph@mastodon.social avatar

@eb … how so?

eb,
@eb@social.coop avatar

@glyph my xcode uses like 3gb, I meant generous to xcode

glyph,
@glyph@mastodon.social avatar

@eb Oh. Yes, this is Xcode doing literally nothing immediately after launch vs. Signal displaying 3 years of chat history

gruber,
@gruber@mastodon.social avatar

I have been using the Mac for a long time and I can't recall ever seeing a prompt like this when I ⌘Q an app:

orangewolf,
@orangewolf@mastodon.social avatar

@gruber Chrome does it. So do most background utils like Hazel or Raycast do to.

gruber,
@gruber@mastodon.social avatar

@orangewolf I’m not talking about confirming the Quit command, I’m talking about begging to stay running.

orangewolf,
@orangewolf@mastodon.social avatar

@gruber That’s fair, though Ive always read the Chrome one as whiny, maybe that’s just my personal biases

caseyliss,
@caseyliss@mastodon.social avatar

@gruber chrome, IIRC

gruber,
@gruber@mastodon.social avatar

@caseyliss Chrome’s “hold ⌘Q to Quit” thing is weird, but I’m talking about begging to remain open in the background.

ianmurren,
@ianmurren@mastodon.social avatar

@gruber @caseyliss the adobe creative cloud app does that, offers to hide instead

vanitalo,
@vanitalo@mastodon.social avatar

@gruber @caseyliss That’s the second thing I disable in chromium based browsers after setting to resume last session on open.

gruber,
@gruber@mastodon.social avatar
kirb,
@kirb@hachyderm.io avatar

@gruber @caseyliss Not weird, it’s handy and often a life saver to have it catch you press the wrong key. Firefox also makes you confirm you’re really sure. I’d consider it weird that Safari hasn’t matched its competition here.

scottwillsey,
@scottwillsey@social.lol avatar

@kirb it defeats the whole point of keyboard shortcuts. I don't use them to get asked 20 questions, i use them exactly NOT to get asked 20 questions. 😄 @gruber @caseyliss

kirb,
@kirb@hachyderm.io avatar

@scottwillsey @gruber @caseyliss I press ⌘W in my browser constantly, I very rarely want ⌘Q, but Q is right next to W where I can accidentally press it and ruin my day. When I really do want it, I can hold it or hit return to confirm. Really not a big deal.

gruber,
@gruber@mastodon.social avatar
gruber,
@gruber@mastodon.social avatar

@kirb @caseyliss Asking for confirmation isn’t weird. Telling the user to press-and-hold Cmd-Q to quit is.

leonoverweel,
@leonoverweel@mastodon.social avatar

@gruber @caseyliss I think that’s mostly for people like me who never intentionally cmd+Q anything on purpose and sometimes hit that combination by mistake. Wouldn’t be surprised if there’s more of us than people who use cmd+Q intentionally.

Sonofasailor,
@Sonofasailor@mastodon.social avatar

@gruber Insta-delete.

miu,
@miu@mastodon.social avatar

@gruber Thank you for killing even the faint interest i had in trying it.

primalanomaly,
@primalanomaly@mastodon.social avatar

@gruber Adobe used to do this lol

mikeagore,
@mikeagore@mastodon.social avatar

@gruber also fun that it doesn’t even give a reason

agiletortoise,
@agiletortoise@mastodon.social avatar

@gruber Chrome does it’s “really quit” BS, but that’s next-level nonsense.

clonezone,
@clonezone@mastodon.social avatar

@agiletortoise @gruber Yeah… but Command-Q is right next to Command-W and browsers have long restart times, so I have found the similar thing in Firefox to be useful.

joelhousman,
@joelhousman@mastodon.social avatar

@agiletortoise @gruber and under the File menu in Chrome you can toggle off the “really quit” question from popping up again.

mikenichols,
@mikenichols@mastodon.social avatar

@agiletortoise @gruber lol yes I only use chrome on occasion when I’m having an issue that seems potentially browser related. Every time chrome tells me to “hold to quit” I always feel like I’m going to close chrome and then the next app in the queue accidentally.

lm1,
@lm1@mastodon.social avatar

@mikenichols @agiletortoise @gruber You can just cmd Q twice instead, which I found to be more reliable or at least seemingly safer than holding it (Chromium has the same behavior)

mikenichols,
@mikenichols@mastodon.social avatar

@lm1 @agiletortoise @gruber that’s actually what I do, and even that worries me I’m going to accidentally kill the next app in the queue. My muscle memory really doesn’t like that move.

gruber,
@gruber@mastodon.social avatar

@mikenichols @lm1 @agiletortoise Just turn off the option.

mikenichols,
@mikenichols@mastodon.social avatar

@gruber @lm1 @agiletortoise I use Chrome so infrequently I didn't look for the setting. Just found it and disabled it.

gruber,
@gruber@mastodon.social avatar

Putting aside the thirstiness of asking for an app to remain running in the background, despite it consuming 1.8 GB of RAM in idle state, "Close" does not mean “Quit" in Mac parlance, and the Cancel button should be on the left.

J_Fo,
@J_Fo@mastodon.social avatar

@gruber You're really selling me on this thing.

collin,
@collin@ruby.social avatar

@gruber That's the kind of craft and attention to detail I want from the people who have all my chat service credentials.

tylerknowsnothing,
@tylerknowsnothing@mastodon.social avatar

@gruber Well, doesn't look like I'll be diving into that anytime soon. Is Adium still a thing?

gruber,
@gruber@mastodon.social avatar

@tylerknowsnothing Adium has been dead a long long time. Was only for "instant messaging” platforms, all of which themselves are dead.

tylerknowsnothing,
@tylerknowsnothing@mastodon.social avatar

@gruber That's a bummer. I'll stick to Mastodon, Matrix, and Telegram.

matt,
@matt@isfeeling.social avatar

@gruber Not sure if you used Texts, but it asks for accessibility features to control your screen and then uses that to automatically click a system pop up asking for elevated permissions to see your messages data. I get why they thought that would be more seamless for the user, but it left a bad taste in my mouth.

Really wish these apps didn’t feel so awkward.

Cstnskld,
@Cstnskld@vivaldi.net avatar

@matt @gruber both Texts and Beeper are part of the same company now, Automatic. Beeper looks like their main product going forward.

gruber,
@gruber@mastodon.social avatar

@Cstnskld @matt I suspect it’s more Texts, the app, but Beeper, the brand, going forward.

dougburns,
@dougburns@mastodon.social avatar

@gruber you wouldn't close me, would you? 🥺

EshuMarneedi,
@EshuMarneedi@mastodon.social avatar

@gruber I don't even understand why they ask you to first install the desktop client when you try to set up the iOS one. What are they doing in the background?

j_holtslander,
@j_holtslander@mastodon.social avatar

@gruber I’ve seen Chrome do similiar.

ironicsans,
@ironicsans@mastodon.social avatar

@gruber Adobe’s Creative Cloud app does something similar when you quit, suggests you leave it running in the background instead (At least it used to. Can’t confirm it still does)

jblake,
@jblake@mastodon.social avatar

@gruber IIRC, with Classic Mac, no software could override Command-Q. I wish that were still the case.

pmcg,
@pmcg@mastodon.social avatar

@jblake @gruber That seems unlikely since any wise-ass (like me or Gruber) could easily override it using ResEdit. Of course it would be unseemly.

gruber,
@gruber@mastodon.social avatar

@pmcg @jblake Yeah, there was no system level magic to ⌘Q, it was just a universal convention.

jblake,
@jblake@mastodon.social avatar

@gruber @pmcg I must be remembering something from the HIG.

dmnelson,
@dmnelson@mastodon.social avatar

@jblake @gruber @pmcg I’m not here to defend Chrome (I avoid it myself) but I can see the logic in a world where the browser is practically a second operating system. You can have numerous “applications” in it, which may have active state or unsaved user data. An accidental quit of a web browser is potentially a data-loss event. So I think it makes sense in the same way it makes sense to ask if you really wanted to shut down your computer. You might be real sad if it didn’t.

gruber,
@gruber@mastodon.social avatar

@dmnelson @jblake @pmcg Sure but telling users to hold ⌘Q is the wrong way to do it on MacOS.

pmcg,
@pmcg@mastodon.social avatar

@gruber @dmnelson @jblake I agree, John. But, press & hold is a way to do things on iOS!

gruber,
@gruber@mastodon.social avatar

@pmcg @dmnelson @jblake Not with command keys.

pmcg,
@pmcg@mastodon.social avatar

@gruber @dmnelson @jblake I cannot argue because I have never used an iOS device with a keyboard. But on the other hand, I feel like you have been strident in wishing more MacOS "gestures" (as it were) should be on iPad. But not the other way?

Pressing a window up to the top of display for … a while … does enter a new mode on MacOS!

mikenichols,
@mikenichols@mastodon.social avatar

@gruber Ford’s app called Ford Pass for their newer vehicles does something similar on iOS after you quit the app. You immediately get a notification that asks you to keep the app open so that their “phone as a key” feature will work “more reliably.” For the record, the feature doesn’t work reliably whether the app is in the foreground, running in the background, or not running at all.

Chancerubbage,
@Chancerubbage@mastodon.social avatar

@gruber don’t be fooled Automattic is all about AI scraping scraping and user profiling despite the gorgeous Trojan horse promise of a unified universal messaging and microblogging platforms. I wouldn’t dare use it for personal or private communications.

agiletortoise,
@agiletortoise@mastodon.social avatar

@gruber And to think, just the other day I thought idle Drafts having 12 threads seemed a little high and spent an hour looking into reducing that.

kraigschmidt,
@kraigschmidt@mastodon.social avatar

@gruber

Why doesn’t Apple ban electron apps?!

Or at least provide users a way to systemically disable it?!

Jesus, what a dumpster fire.

gruber,
@gruber@mastodon.social avatar

@kraigschmidt You might be jesting, but the truth is Apple has banned Electron apps -- on iOS. And that's exactly the sort of protection the DOJ's antitrust complaint argues is abuse of their supposed monopoly.

nyquildotorg,
@nyquildotorg@fedia.social avatar

@gruber @kraigschmidt do you mean Apple has banned apps built using concepts that Electron uses? Because electron is a desktop technology and doesn't target iOS or Android at all...

gruber,
@gruber@mastodon.social avatar

@nyquildotorg @kraigschmidt Correct. I'm not talking about Electron specifically but Electron-like runtimes. Just not allowed on iOS.

nyquildotorg,
@nyquildotorg@fedia.social avatar

@gruber @kraigschmidt I think you need further clarification. The only part of Electron-like that Apple doesn't allow is the chromium engine baked into Electron. I've shipped apps on iOS with multiple javascript-in-webkit frameworks...

eb,
@eb@social.coop avatar

@gruber @kraigschmidt isn't Capacitor just packaging a webview for iOS and Android? I'm not convinced on this claim.

nyquildotorg,
@nyquildotorg@fedia.social avatar

@eb @gruber @kraigschmidt I think maybe what he's insinuating is that Electron specifically uses Chromium rather than "a webview," and non-webkit engines aren't allowed. I've definitely shipped Cordova apps on iOS, which work the same way but using the WebKit that's already on iOS 🤷

eb,
@eb@social.coop avatar

@nyquildotorg @gruber @kraigschmidt ah, that makes sense, it was just confusing to see that statement in the context of 'webapps pretending to be real apps use a lot of resources'

nyquildotorg,
@nyquildotorg@fedia.social avatar

@eb @gruber @kraigschmidt yeah. I had the same reaction. Electron doesn't have any mobile OSes as targets 🤷

kraigschmidt,
@kraigschmidt@mastodon.social avatar

@gruber

I wasn’t jesting at all. Don’t get me started on the DoJ and DMA. I’m brutally angry.

I want Apple to be more restrictive, not less.

I want the wall of the garden to be higher and stronger.

Apples not perfect, but they care more (which is to say, at all) about the user experience than anyone else, because that’s the business model they’ve chosen.

There are examples everywhere even with their success Apple still can’t persuade companies to do the right things for UX…

pixel,
@pixel@social.pixels.pizza avatar

@gruber Javascript was a mistake.

fistfulofdave,
@fistfulofdave@mastodon.social avatar

@gruber garbage.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • everett
  • DreamBathrooms
  • modclub
  • normalnudes
  • ngwrru68w68
  • magazineikmin
  • Durango
  • ethstaker
  • Youngstown
  • rosin
  • slotface
  • InstantRegret
  • kavyap
  • thenastyranch
  • megavids
  • osvaldo12
  • Leos
  • cubers
  • tacticalgear
  • khanakhh
  • mdbf
  • GTA5RPClips
  • anitta
  • provamag3
  • cisconetworking
  • tester
  • JUstTest
  • lostlight
  • All magazines