Control Center on macOS is always re-rendering its SwiftUI causing 1% CPU load
twitter.com
twitter.com
I gave up Sublime because of memory usage, but the alternatives aren't much better. I'm getting ready to trade in my 8gb Mac for 24gb to help with this, and if I could get more without having to pony up for a CPU I don't need, I'd get 32gb, or even 64gb.
> To be fair, 8gb hasn't been quite enough for most dev work since containers and VMs became a standard way for local builds and runs.
It's 2023, and as a typical software developer, I think it's pretty reasonable to require a minimum of 16GB of RAM to just edit text. /s
The reality is that software is increasingly more complex and even simple tasks require more and more resources as the cruft builds up.
very light memory usage though, so modern software is obviously so much worse.
Did I say everything should run in 32KB of RAM? I did not. Perhaps now you can be serious instead of sarcastically and tendentiously avoiding the topic of discussion?
It's reasonable for a text editor to use far more than 32KB of RAM, but it's not reasonable for one to not run well on a system with 8GB of RAM (unless the user is editing some massive files).
> The reality is that software is increasingly more complex...
That's true, but also vastly overstated as an excuse for laziness and lack of care.
> ...and even simple tasks require more and more resources as the cruft builds up.
Now you're getting somewhere. There's no good excuse for most modern programs requiring so many resources.
The reason is software engineers are actually terrible at their jobs, and the profession (and its backers) embrace a lot of terrible ideas and excuses. Among other things, the end result is programs that (seemingly more often than not) expand to waste the resources available until performance drops to the minimum acceptable.
I'd love to buy it, but while I'd be happy to pay 99 bucks for a perpetual version with upgrades, I'm not willing to pay 50 dollars every unknown amount of time. Even if I might pay that for a known 5 years worth of updates.
However, for real desktop tools that utilize the operating system's bells and whistles, which truly make an app a desktop app—like Sublime—I'd never use an alternative in the browser.
I such cases I would also never favor an Electron app posing as native software.
Arc seems somewhat resistant to large memory grab issues, but the Notion database kills it as well.
It still has a faster fuzzy file search than anything available in Emacs, which is why I stick with it.
General unsolicited advice to desktop application vendors: unless you have the market size and monopoly of Adobe, Microsoft etc, go with one off pricing.
> I gave up Sublime because of memory usage
Isn't this just because of GPU-mapped memory/textures? Because you can't get much better with any other app, for example text-rendering is not a solved problem yet, there are few nice tricks but they always come with some tradeoff so if you want to support non-english scripts, you usually just go with glyph atlas which needs to include 1:1 glyph-size (retina is big) + up to 3 extra variations because of kerning for each used glyph. System apps do not report this if they are using cocoa but a similar overhead is still there.
Or because of the emoji font, which alone takes 200M!!! And if your app opens it (just to support emojis, not necessarily to draw them), it gets reported as its own memory even when it's usually mmapped and shared between processes (and might not even be loaded in the memory).
What kind of memory usage are we talking about? And how did you measure?
CotEditor with no windows open: 80mb of memory
BBEdit with no windows open: 85mb of memory
In the Activity Monitor.
I'm not sure if you are familiar with how virtual memory works but if you are, then I don't understand what's your point.
Of course, there are a million different workflows people use, not to mention different plug-ins and language packages, etc., so it may just not work for you.
But I don't think there's really an inherent problem.
Stuff like this will be run on the efficiency cores, I doubt it will have a lot of impact on anything.
You can see the usage of efficiency vs performance cores by using Activity Monitor => Window => CPU History
It's constantly monitoring WiFi signals, battery level, checking for background processes to run, and a hundred other things.
Whether CPU usage is being reported as 0% or 1% averaged over the course of a second doesn't have anything to do with poor design. It's just being rounded from values like 0.3% or 0.8% anyways.
While you’re correct that nothing stays truly idle, the modern design is that the main CPU really does stay largely idle because of the power costs involved and instead dedicated microprocessors absorb the load when possible.
Just saying every little thing counts can be very misleading, even though inarguable in theory, and result in non-obvious inefficiency.
Don’t forget about the number of macOS users. A lazy search says ~100 million in 2017.
Apple talks a lot about their environmental impact, they spent like 10% of their last event talking about it. So I think it’s fair to criticize them being wasteful here.
I don't think it's much harder to infinitely update properties that cause a redraw in a non-declarative framework, but doing so probably has less impact because it often won't redraw the entire screen, and may do less work overall because of how the framework is structured.
This may be the case. I worked on a website at work, but never really used the website. One day I was watching someone use it and noticed a bug. I asked the person if they had ever seen that before and they said all the time. I asked them why they didn't report it and they said that they knew we were busy and didn't want to bother us.
Furthermore, I am impressed how they nailed it from the first time: there were no changes since it came out that I noticed, nor would I want any.
There was a slight learning curve, you need to have a good mental model of how it works, but after a day I cannot imagine going back.
(I hate using it on iPad though.)
doesn't solve much and it's been available in all other OS for a long time.
many reported that compressed memory can negatively impact performances in certain scenarios
For example
https://github.com/microsoft/Windows-Dev-Performance/issues/...
† Unless the underlying block device backing the swap device or file does transparent compression, in which case it gets decompressed by zswap then compressed by whatever (e.g LVM compression).
It's the same in Windows.
You can't enable memory compression in Windows unless a page file is present (have not used Windows in 10 years, but that's what I gathered from researching the topic)
Did I say that only recently they started optimizing things?
13.6 on my M2 MacBook air: 0,8 tot 1,1 when idle, not using.
After switching to M1 I haven't looked at Activity Monitor for a long time, as CPU was never my issue. I just realized Microsoft Outlook uses 43% CPU, very astonishing given just one exchange email account is in there.
Control Centre is an always-on process. It sits on the menubar, and provides access to settings like sound, bluetooth, wireless, etc.
Edit to add: On that first screenshot, you can see that Activity Monitor is using 3.4% CPU. In my experience, it fluctuates between 3% and 10% most of the time.
Task Manager using between 0.3% and 0.5% while open here.
Or when the mouse starts entering the target before the click at least?
It also shows the annoying overlay bit when you accidentally open it :D
I wish it could be disabled and the controls put into the menu bar, but infuriatingly you can't.
If you were such a keyboard expert, you'd know that you can 1. Press Cmd+Space 2. Type 'wifi' 3. Do whatever you need to do.
Everything in modern systems is super optimized for the case where the screen is mostly static.
Is this all true? I'm somewhat sceptical of extrapolating that broken processes and waste don't also occur in other industries. A quick Google search says around 30% of building materials delivered to building sites is wasted. I've also seen some pretty impractically designed buildings in my city that probably waste a lot more energy and people's time than they should.
That would be like shipping a square kilometer of forest to the job site to build one house.
The construction industry and modern cars could be more efficient, but their waste is measured in percent, not orders of magnitude.
Whether or not those efficiencies are achieved is left as an exercice to the reader.
My laptop is warm/hot to touch as a result of it.
It looks circular but there are implicit meanings hidden there:
"Teams is bad (not only) because it’s slow. It’s slow because it’s Teams. (as in, Teams has a looong list of defects, slowness just icing on the cake)”
But after receiving the push update converting Team to using the Electron version of the app, CPU load dramatically increased.
Wish I could convert back to the older Apple Silicon non-Electron version.
Teams isn’t a buggier, worse performer than VSCode or Slack because of Electron.
- loading the battery and powering the device
- high gpu power usage when plugging in a external monitor
- cpu power usage
- bad cooling which must be cleaned often
My recommendations:
Plug in the power from the right side. Afaik the thermal throttling kicks in sooner if you have it plugged in on the left.
Clean the device. Unfortunately it really sucks to open it. You will need special tools and lots of trust in the spaghetti monster that you dont break anything.
Cpu power usage can be lowered by using any of the tools:
https://github.com/sicreative/VoltageShift
https://volta.garymathews.com/ (most probably not working anymore)
Unfortunately in later updates apple prevented undervolting the cpu so it's (VoltageShift) use is limited now. But i was able to limit the power usage to 5W, which somehow helped keeping my device cooler. Be aware that you need to disable quite a lot of security measures to install Voltageshift.
Apparently having power saving active even when plugged in helps keeping the cpu and gpu cooler. I did not test this extensively because i switched to a m2.
A big problem comes from the gpu, if you have an external monitor plugged in, the video drivers start using 10W+ which causes problems when you are loading the battery as well. There are a lot of discussions on what causes the problems, it has to do with the drivers and some screens causing it to use way more power then needed. It can help to close the lid of the macbook while working with a external monitor.
At this point the most likely culprit is the battery, mine is at 789 cycles although the condition is reported as "normal". I wish it were possible to confirm whether battery is an issue before spending couple hundred $ on replacement though
Then she got a warning that the battery needed servicing. After getting it replaced (and the Apple employee warning us several times that it might not help performance), the laptop was back to its previous state. My theory is that the battery running warmer was causing the CPU to throttle. Or perhaps cleaning out the machine while replacing the battery helped it thermally. Or maybe both.