I 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.
I do heavy dev work on an 8GB M1 Mac. Like, dozens of Chrome tabs, multiple IDEs, Notion, Slack, etc. Works great. MacOS does a good job at compressing memory and using swap. The SSD on an M1 Mac is basically DDR2 speed, so even if you're mostly running on swap programs still execute fast enough.
>> 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
> “You silly kids and your 16GB of RAM! Back in my day, we got by with 32KB!”
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.
The alternative isn’t always “people just need to be better at their job”. Sometimes the alternative is that the thing you like to use never gets built at all because the cost of building it “right” would be prohibitively expensive. It’s always a balance.
BBEdit has been my go to for a long time, as a person who came from Windows, it was a good replacement for Notepad++.
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.
Might have considered it, but saw the subscription-only pricing and left.
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 tend to apply this thinking to my software purchases as well, but in the spirit of conversation I’ll offer that I also make exceptions for software I find to be 1) fantastically good _and independent_, or 2) only make sense with an Internet connection and/or requires or includes some kind of vendor-specific remote service.
Theoretically it is, but on one Linux computer I have it freezes from time to time, whereupon it stops redrawing frames, resizing the window results in gray rectangles etc. I think it’s caused by a slower disk, which is sad, because I don’t think that’s a legitimate reason for a UI to stop working. I can accept having to wait when opening a file, but the UI completely freezing is unacceptable. I typically close and open it again in those situations.
It still has a faster fuzzy file search than anything available in Emacs, which is why I stick with it.
For electron-based tools that were designed as web-first apps, I agree with you that it's better to have them in a browser tab than as standalone apps.
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.
> 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.
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?
I guess it varies... I have ~50 files open in sublime right now, mostly small, but some fairly large (e.g. one is 600K), and I'm seeing 279MB in activity monitor. It was less, but I cycled through all my open files just to keep it honest.
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.
oops, I mean Sonoma -- whatever the very latest is. Sorry, I can't keep these names straight. I was installing betas on this machine, so I had the final release somewhat earlier than the official release since the beta RC2 and final release were the same.
When Microsoft finally added official support for that feature, people were mocking them for how long it took them, "how many resources could it possibly consume". Here we see the result.
Just 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
Realistically 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.
Monitoring Wi-Fi signals is, afaik, something that happens on the Wi-Fi chip itself, not the CPU.
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.
It's only a fraction of the CPU's power, sure, but it's still consuming power (electricity & processing) without actually doing anything, which is wasteful. And every small inefficiency adds up over the scale of everything.
> Perhaps but this thread and discussion might add up to a year's worth of that waste.
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.
in this example it's showing the seconds on the clock, which might be useful to some. (Just pointing out that using < 0.1% of the total CPU (depending on how you'd weight the efficiency cores) should not be a dealbreaker if you like this feature)
This 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.
Yes, 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.
I 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.
I turned on Stage Manager around the time it was implemented in macOS, to try. I never turned it off. It has addressed pretty much every window management woe I had.
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.
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.
I could never get this sample trace despite many attempts. Clearly there is a feature that triggers this behavior, or it has been fixed in the latest OS update. Given the enormity of an operating system and its many moving parts, things will fail occasionally.
Meanwhile Apple is the company most actively working on better battery performance, less memory utilization (e.g. compressed memory) and other such changes...
Don'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.
Not 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).
> 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)
Me 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.
Control 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.
Control 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
I 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.
Control 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.
In 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.
Yeah, instead of having keyboard users do the normal thing to check their WiFi, interacting with the menubar, they should instead, every time, 1. Open System Settings; 2. Type Cmd-F; 3. type "wifi"; 4. press Tab 2 times
It's not a backslide, though. Control Center has never been accessible by keyboard and neither is the menu bar unless an app has a specific shortcut key.
I'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?
I 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.
Yea 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.
> 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.
"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.
Off 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.
I wish someone did an analysis to determine why my intel-based macbook is so incredibly laggy all the time, even after fresh system installation. I can't shake the feeling that Apple Silicon is so much faster that performance issues just got into the system without anyone at Apple bothering to fix them, and Intel macs suffer as a result.
My wife’s Intel-based laptop got considerably slower in the last year or so. I tried everything I could but nothing seemed to return it to its original performance.
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.
Interesting, how old was it? Do you recall how many cycles the battery was at? Unfortunately throttling is unlikely in my case, at least for the lagging I observe day-to-day, I don't see any throttling via `pmset -g thermlog`. I did wonder if changing thermal paste would help, but since I don't observe throttling I'm not sure it would
- 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:
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.
Thanks for the suggestions, this all sounds plausible, however:
- I routinely clean, or at least de-dust everything accessible after removing back cover
- the lag is there always, even right after resuming the mac, before any thermal throttling should be kicking in. I also don't observe throttling with `pmset -g thermlog`
- I'm not using an 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
As 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)”
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.