25 ms·
Control Center on macOS is always re-rendering its SwiftUI causing 1% CPU load
- DRAGONERO 3y agoThat's probably a good amount of battery life that can be claimed back once this is fixed
- aranw 3y agoThe fix will be ready for the next macOS Apple Event so that they can claim battery performance improvements
- coldtea 3y agoMeanwhile Apple is the company most actively working on better battery performance, less memory utilization (e.g. compressed memory) and other such changes...
- peoplefromibiza 3y ago> compressed memory 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/35 https://github.com/microsoft/Windows-Dev-Performance/issues/...
- lloeki 3y agoDon't know how compressed memory works for in Windows, but on macOS its role is equivalent to swapping. No memory is compressed unless pages are evicted due to not being used. If memory compression wasn't present then it'd been swapped to disk.
- taway1237 3y agoSounds exactly like zswap. Are there differences that make it better?
- lloeki 3y agoNot that I know of. What I don't know and which might make a difference is when evicting to disk, zswap decompresses and swaps to disk uncompressed† as if swap wasn't there, while macOS might (or might not) disk-swap it compressed (so, a bit by bit copy), minimising CPU, IO, and size (and wear for SSDs) at the cost of decompressing when paging it in again. † 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).
- peoplefromibiza 3y ago> No memory is compressed unless pages are evicted due to not being used 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)
- devcat 3y agoMacOS had compressed memory for at least a decade
- coldtea 3y agoI know. Your point being? Did I say that only recently they started optimizing things?
- deleted 3y ago[deleted]
- hulitu 3y agoFixed ? This is modern UX design.(drawing the whole screen when the cursor blinks)
- tuukkah 3y agoIt's not a UX issue whether to redraw a larger area than where the changes are.
- vor_ 3y agoCPU usage isn't equivalent to power usage, so this should have no practical effect on battery life.
- alberth 3y agoIs FB13204831 the bug ticket? https://nitter.net/tomaskafka/status/1706403105661722849#m https://nitter.net/tomaskafka/status/1706403105661722849#m
- viraptor 3y agoIt's the Apple feedback thing. https://developer.apple.com/bug-reporting/ https://developer.apple.com/bug-reporting/ They're not public of course, because it's an apple thing.
- danpalmer 3y agoThis is such a classic UI programming bug, and almost every UI programming framework has a way to achieve this accidentally using core components. React is notorious for this, but even in non-declarative frameworks it's very easy to get a reactivity loop on a trigger or model update and do this.
- 4death4 3y agoIt’s way easier in declarative frameworks, though.
- jondwillis 3y agoYes, but only because you aren’t re-rendering when data changes (which is half of the entire point of an UI) implicitly. Having worked on enough imperative UI kludge, I think that declarative probably saves enough dev-hours (and associated calories, Typescript, Swift, Rust, etc. compile time) to outweigh the infinite loop bugs.
- 4death4 3y agoI meant it’s way easier [to enter an infinite render loop] in declarative frameworks.
- danpalmer 3y agoI would say it's way easier to define an infinite render loop in declarative frameworks, and therefore it's easier to notice the issue and address it. Causes and fixes are just more obvious. 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.
- robjwells 3y agoI wonder if this is a bug introduced in macOS 13 (Ventura). I've been watching the Activity Monitor inspector for Control Centre on my 2017 Air, running 12.6.8, and it's at 0.00, occasionally boosting up to 0.01.
- lloydatkinson 3y agohttps://tonsky.me/blog/disenchantment/ https://tonsky.me/blog/disenchantment/
- pazimzadeh 3y agoImagine how snappy Snow Leopard would be on an M1
- leokennis 3y agoEvery time this site is linked I toggle the dark mode icon, it has never failed to make me laugh.
- deleted 3y ago[deleted]
- jamil7 3y ago> Modern cars work, let’s say for the sake of argument, at 98% of what’s physically possible with the current engine design. Modern buildings use just enough material to fulfill their function and stay safe under the given conditions. All planes converged to the optimal size/form/load and basically look the same. 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.
- gcanyon 3y ago"let's say for the sake of argument" is doing a fair bit of work here. But the point is that we had text editors (similar to the ones we have today) back when CPUs were capable of maybe a few millions of instructions per second. CPUs can now do tens or hundreds of thousands as many instructions, but a text editor today uses several percent of that CPU. 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.
- Kiro 3y agoWhat does "even though there is no UI visible" mean?
- andreasley 3y agoControl Center is an overlay that is only shown when the appropriate icon in the menu bar is clicked. https://support.apple.com/guide/mac-help/mchl50f94f8f/13.0/mac/13.0 https://support.apple.com/guide/mac-help/mchl50f94f8f/13.0/m...
- coldtea 3y agoCouldn't it render on demand (on click)? Or when the mouse starts entering the target before the click at least?
- kennywinker 3y agoIt could. That’s the point
- olliej 3y agoControl center is responsible for drawing a bunch of the ui on the top right of the menu bar, things like the clock (many comments here seem to be saying this is related to showing seconds), Wi-Fi, sound settings, etc. It also shows the annoying overlay bit when you accidentally open it :D
- andreasley 3y agoIndeed! When "Display the time with seconds" is enabled for the menu bar clock, Control Center sits at 0.8% CPU activity instead of 0.0% on my Mac.
- olliej 3y agoI think part of the confusion is that there's the feature "Control Center" and the process controlcenter so you would reasonably think it's only involved in the marketing feature's UI.
- andreasley 3y agoCan't reproduce this on macOS Ventura 13.6 on a Mac Studio.
- frankjr 3y agoMe neither (both Monterey and Ventura sit on 0%). Maybe it depends on the items you have in there? I don't think I've ever made any changes.
- michelb 3y ago13.5.2 on Mac Studio and I def see it at 1,0 to 1,5 when not using it. Will update this mac later. 13.6 on my M2 MacBook air: 0,8 tot 1,1 when idle, not using.
- yftsui 3y agoMe neither, M1 MacBook Pro with Ventura 13.6, Control center is only 0.1% CPU. 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.
- alberth 3y agoOff topic: I wish someone would do this kind of analysis to determine why Microsoft Teams helper process is always at 50-70% CPU load on my M-Based MacBook Pro. My laptop is warm/hot to touch as a result of it.
- deleted 3y ago[deleted]
- ThePowerOfFuet 3y agoBecause Teams, and also because Electron.
- dmd 3y agoThat’s essentially a circular argument. “Teams is bad because it’s slow. It’s slow because it’s Teams.”
- worewood 3y agoAs a Teams user on the crappy PCs the company gives, this is an argument I can get behind. 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)”
- dmd 3y agoYeah fair.
- dangus 3y agoI’m not experiencing that issue. Have you tried completely uninstalling it and reinstalling?
- alberth 3y agoI never had this issue when running the Apple Silicon Microsoft Teams version. It actually was quite good, contrary to what most would say. 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.
- nsonha 3y agoIs Swift UI the problem here? Sounds like the compositor or equivalence isn't doing its job
- coldtea 3y agoI see 0% CPU for control center here (13.6) so either fixed, or not always the case.
- lifty 3y agoSame here
- lapcat 3y agoSame here: 0% CPU, macOS 13.6, M1 MacBook Pro
- lawgimenez 3y ago0% too, I am on Sonoma RC.
- londons_explore 3y agoIt must not always be the case. I'm sure they have a power team at Apple who ensure a Mac can sit on the desktop without any CPU wake-ups.
- deleted 3y ago[deleted]
- viraptor 3y agoThey may have a team, but they actually need to use it. Given the amount of bigger broken things in the new MacOS version, I wouldn't hold my breath.
- solarkraft 3y agoIt's kind of crazy how broken some things like stage mangler are. It's like it has never been used once.
- irrational 3y ago> It's like it has never been used once. 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.
- ac130kz 3y ago1% CPU load? Windows 11's Task Manager sips 6-8% of my 9750H
- cassianoleal 3y agoControl Centre is not related to Task Manager at all though - that would be Activity Monitor (which is the first screenshot, where he shows Control Centre is using 1% CPU). 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.
- hu3 3y agoI'm on a client laptop today. Same 9750H processor, Windows 11 Pro. Task Manager using between 0.3% and 0.5% while open here.
- knallfrosch 3y agoOpen Task Manager, focus a different window and wait 5 seconds. 0.x% CPU usage.
- DarkSkyGhost 3y agoTurning off "Display the time with seconds" lowers the 1% CPU load to 0% for me.
- ekanes 3y agoSettings > Control Center (scroll down to bottom) > Clock Options > Display the Time in Seconds
- michelb 3y agoNice find. I always have seconds displayed, but disabling it reduced the CPU load to 0%
- fifafu 3y agoJust be aware that 1% on modern multi-core systems is not a lot. The macOS activity monitor doesn't calculate the average percentage over all cores, instead (AFAIK) a process on e.g. a M1 Pro/Max can use up to 1000% if it utilizes all 10 cores. 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
- andreyv 3y ago1% is still a lot for power saving. If the system is idle, it should be at 0%. If it is anything above, then it shows poor design.
- klausa 3y agoThe only state where a modern computer is "idle" is when it's turned off.
- crazygringo 3y agoRealistically no modern consumer OS is ever at idle for long. 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.
- gcanyon 3y agoI am currently at war with google docs and notion re: memory usage. gmail takes something like half a gigabyte of memory. I had a notion database where each time it loaded an additional 25 rows, memory use went up 400MB. It only got up to 200-300 rows total before it died. 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.
- jusssi 3y agoTo 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.
- miroljub 3y agoI don't think it's an excuse for Notion. It's not like it's spinning a new container for each and every database row.
- wlesieutre 3y agoYou never know, maybe that's their row microservice.
- tivert 3y ago>> 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
- fassssst 3y agoYea anything that unnecessarily updates the screen has lots of unexpected power consumption effects. For example, it might prevent the CPU or display itself from entering lower power modes. Everything in modern systems is super optimized for the case where the screen is mostly static.
- solarkraft 3y agoControl center is one of the worst parts of my macOS usage. It keeps taking seconds to (abruptly) show up and on my multi-monitor system it sometimes shows up between corners or on the opposite site of the monitor I activated it on. I wish it could be disabled and the controls put into the menu bar, but infuriatingly you can't.
- irrational 3y agoI've been using a mac for decades, but had no idea what control center was until about 1 minute ago when I read your comment and googled it. What in the world does control center provide that you find so essential?
- vmladenov 3y agoAirDrop settings?
- irrational 3y agoI just open Finder, select Airdrop from the left menu, and... that's it.
- lelandfe 3y agoGo try and use it with any part of the keyboard, too. It’s jarring how rapid the backslide on accessibility and interface standards macOS has been.
- howinteresting 3y agoIt's just another reminder that Apple, like all other big tech companies, is full of mediocre software teams working on unreasonable deadlines.
- dkonofalski 3y agoIn fairness, none of the options present in Control Center are exclusive to it. Everyone one of the options is available in System Preferences (with full keyboard support) or elsewhere.
- beefman 3y agoThis is 1% of the current load, not 1% of CPU capacity.
- Alifatisk 3y agoI hope this get fixed asap, that’s ridiculous