News for hackers. Stuff that matters.
Re:macOS keeps a huge wallpapers cache by ryandrake on Tuesday September 27, 2022 @07:38PM (#33002561)
Xcode is a huge offender, at least for me. At 36GB, not only is it the largest application in my Applications folder (it is larger than all my other applications combined), it also litters /Library/Developer with about 9GB of shit (mostly simulator runtimes), and then litters ~/Library/Developer with 33GB of shit (mostly caches). Almost 80GB disk footprint... just to develop software?
Re:macOS keeps a huge wallpapers cache by christoph on Tuesday September 27, 2022 @08:10PM (#33002808)
I highly recommend the free app DevCleaner - https://apps.apple.com/us/app/devcleaner-for-xcode/id1388020...

I use it almost weekly to clear out the tens of gigabytes of garbage Xcode regularly generates.

Re:macOS keeps a huge wallpapers cache by metadat on Tuesday September 27, 2022 @08:14PM (#33002832)
Should not be necessary. It's just wrong to have a whole app dedicated to cleaning up after Apple's Lazy Ass.
Re:macOS keeps a huge wallpapers cache by astrange on Wednesday September 28, 2022 @12:53AM (#33004365)
It isn't necessary, caches are deleted automatically. You just don't have low enough disk space to need it deleted.

(This doesn't necessarily apply to apps who don't put things in Caches folders…)

Re:macOS keeps a huge wallpapers cache by capableweb on Wednesday September 28, 2022 @05:05AM (#33005926)
Except Xcode can't possibly know before hand when I do need the space back. Let's say I have 10GB free, so Xcode says "Well, you just don't have low enough disk space to need it deleted" while I'm trying to install Premiere Pro that requires 30GB of space (just an example), but I can't, because I don't have enough disk space.

How about not trying to guess when the user needs the space?

Re:macOS keeps a huge wallpapers cache by MereInterest on Wednesday September 28, 2022 @07:27AM (#33006718)
This is the same problem I have with the "unused RAM is wasted RAM" argument. So long as a system has a maximum of one application using this strategy, it works. As soon as you have two independent programs each of which try to cache as much as possible, it falls apart.

For a while, the browser could reasonably assume that it was the only application that used this strategy, and it was a true assumption. Now that native executables are being replaced by web-based applications, every program is trying to maximize its RAM usage, with predictable results.

Re:macOS keeps a huge wallpapers cache by astrange on Wednesday September 28, 2022 @05:05PM (#33013247)
It works fine if they tell the VM that its cache regions are purgeable, so they just go away under pressure instead of getting swapped out.

Of course getting swapped out is usually fine too.

Huge memory usage is more likely because they don’t know how to check for memory leaks, not because they’re trying to use it.

Re:macOS keeps a huge wallpapers cache by astrange on Wednesday September 28, 2022 @05:02PM (#33013213)
How’s the “I can’t” work? If the installer is telling you it can’t that just means it’s checking for free disk space the wrong way.
Re:macOS keeps a huge wallpapers cache by solarmist on Wednesday September 28, 2022 @10:09PM (#33015576)
The fact there’s a right way and wrong way to check free disk space is a problem in the first place.
Re:macOS keeps a huge wallpapers cache by astrange on Thursday September 29, 2022 @01:53AM (#33016937)
Pretty classic problem.

https://en.wikipedia.org/wiki/Time-of-check_to_time-of-use

Similar assumptions about filesystems fail if they do data compression or dedupe files - you can easily overestimate how much space something is taking.

Re:macOS keeps a huge wallpapers cache by solarmist on Friday September 30, 2022 @04:43PM (#33040543)
Ah. Ok that makes more sense.
Re:macOS keeps a huge wallpapers cache by sys_64738 on Tuesday September 27, 2022 @10:17PM (#33003546)
There is a tool in the MacOS that will find large sized apps and allow you to delete them.
Re:macOS keeps a huge wallpapers cache by happymellon on Wednesday September 28, 2022 @12:29AM (#33004259)
But we already know what the large tool is, and it can be a dependency for other languages when using natively compiled libraries.
Re:macOS keeps a huge wallpapers cache by zaphirplane on Wednesday September 28, 2022 @02:51AM (#33004955)
What is the tool ?
Re:macOS keeps a huge wallpapers cache by tempodox on Wednesday September 28, 2022 @04:45AM (#33005751)
Apple Menu > About This Mac > Storage > (Volume Name) > [Manage...]
Re:macOS keeps a huge wallpapers cache by twosdayz on Wednesday September 28, 2022 @09:33AM (#33007715)
DaisyDisk is one of them
Re:macOS keeps a huge wallpapers cache by saagarjha on Tuesday September 27, 2022 @08:26PM (#33002902)
Apple has added a thing in Ventura (?) to list and let you remove these files.
Re:macOS keeps a huge wallpapers cache by sprkwd on Wednesday September 28, 2022 @02:30AM (#33004850)
Does it have a name?
Re:macOS keeps a huge wallpapers cache by tempodox on Wednesday September 28, 2022 @04:48AM (#33005788)
Apple Menu > About This Mac > Storage > (Volume Name) > [Manage...]
Re:macOS keeps a huge wallpapers cache by vladvasiliu on Wednesday September 28, 2022 @02:56AM (#33004981)
I don't know the name, but IIRC it's something like "disk usage". It resembles roughly the "storage" panel on iOS.
Re:macOS keeps a huge wallpapers cache by _rs on Wednesday September 28, 2022 @06:33AM (#33006442)
On macOS 12 it's part of the System Information app at least and called "Storage Management"
Re:macOS keeps a huge wallpapers cache by vladvasiliu on Wednesday September 28, 2022 @06:51AM (#33006543)
I'm pretty sure it was there before, my 2013 mbp is too old to run the latest version, and I've seen it there, too.
Re:macOS keeps a huge wallpapers cache by sys_64738 on Tuesday September 27, 2022 @10:18PM (#33003549)
It was in Monterey too and maybe earlier.
Re:macOS keeps a huge wallpapers cache by fotta on Tuesday September 27, 2022 @11:52PM (#33004052)
At least since Yosemite. I used it a lot in college when I was using a 128gb MacBook.
Re:macOS keeps a huge wallpapers cache by saagarjha on Wednesday September 28, 2022 @05:26AM (#33006063)
The developer section is definitely newer than that…
Re:macOS keeps a huge wallpapers cache by hugi on Wednesday September 28, 2022 @05:22AM (#33006037)
Holy crap. Thank you for that pointer and my 92GBs of newly free space.
Re:macOS keeps a huge wallpapers cache by mro_name on Wednesday September 28, 2022 @02:20AM (#33004798)
I find it so embarrassing because every dev gets fed this culture. Or take the insane update sizes. Os or Xcode. Or the upload to the app store useing bandwidth several times the binary size. An app that used to be .5MB in objc is now in swift 15MB tesflight, 70MB production ipa and 300MB upload traffic.

That's what sustainability looks like in the eyes of a hardware supplier.

Re:macOS keeps a huge wallpapers cache by m463 on Tuesday September 27, 2022 @09:50PM (#33003404)
OmniDiskSweeper is free: https://www.omnigroup.com/more
Re:macOS keeps a huge wallpapers cache by duskwuff on Tuesday September 27, 2022 @11:12PM (#33003853)
Re:macOS keeps a huge wallpapers cache by saagarjha on Tuesday September 27, 2022 @08:25PM (#33002896)
Xcode is actually only about 17 GB on disk, assuming you haven’t copied it anywhere. When it’s installed transparent APFS compression is applied to the bundle.
Re:macOS keeps a huge wallpapers cache by metadat on Tuesday September 27, 2022 @09:40PM (#33003340)
"Only 17GB"

Lol.

Re:macOS keeps a huge wallpapers cache by saagarjha on Tuesday September 27, 2022 @11:34PM (#33003958)
It’s down to 11 with Xcode 14 ;)
Re:macOS keeps a huge wallpapers cache by olliej on Tuesday September 27, 2022 @11:57PM (#33004084)
I know right? It’s only multiple OSs, multiple simulators, duplicated binaries for them all. Totally unreasonable for it to be 17gig! After all chrome manages to fit in only half a gig, and it has like a whole browser.
Re:macOS keeps a huge wallpapers cache by mro_name on Wednesday September 28, 2022 @02:22AM (#33004806)
Who needs it all? Don't force on me what I don't need as once was and alas is no more.
Re:macOS keeps a huge wallpapers cache by olliej on Wednesday September 28, 2022 @04:35PM (#33012917)
It's all there because the usability is much better if you download one thing, and then no matter what you then choose to work on, it's available.

That said, I think that code signature on Xcode does let you delete whichever sdks and simulators you want without invalidating the main package signature? (This is _very_ much an "I think" case). That would remove the "force" element you find to be a problem.

Re:macOS keeps a huge wallpapers cache by mro_name on Thursday September 29, 2022 @02:54AM (#33017314)
> usability is much better

of the download/onboarding! Which is not what I should spend most my time with Xcode anyway.

I would eagerly spend 5 minutes more choosing if I could reduce the several hours (sic!) download time and save insane amounts of energy.

Re:macOS keeps a huge wallpapers cache by olliej on Thursday September 29, 2022 @03:40AM (#33017592)
> of the download/onboarding! Which is not what I should spend most my time with Xcode anyway.

No, of the runtime use. There is no need to have a up front "what hardware are you planning to target?" "what OS versions are you planning to target?".

The several hour download when high speed internet is not available is obviously annoying, but it is not remotely "insane amounts of energy".

But on the other hand you don't get in a position where you think you've made the correct selection, and then a little bit later you go to do something and can't, so have to wait on another download, right when you were wanting to do something.

The approach of "everything in one bundle" is the correct option from a usability point of view, which is clearly what has been favored. It is also clearly and reasonably frustrating that that one download is large and on slower connections is very long. The thing is that the single download means that the install path is "set it to download; go to bed; get up and use freshly downloaded gigantic bundle" with no risk of thinking your done, but then not having everything you need. I suspect the latter would result in many more people complaining on twitter, or needing support.

I do want to be clear though that I agree the large download is annoying, and surely something could be done to reduce the size.

Re:macOS keeps a huge wallpapers cache by ayewo on Wednesday September 28, 2022 @02:17PM (#33011295)
I assume you are referring to Xcode's on disk size on Apple Silicon because I downloaded Xcode 14.0.1 yesterday (a 7.6 GB download) which expanded to 23.01 GB on disk. This is on a MBP with an Intel chip.
Re:macOS keeps a huge wallpapers cache by saagarjha on Wednesday September 28, 2022 @06:27PM (#33014050)
That’s likely uncompressed. Try running du -h -d0 against it to see its on-disk usage. If it’s still high, you probably accidentally decompressed it and might benefit from a reinstall to fix that.
Re:macOS keeps a huge wallpapers cache by ayewo on Thursday September 29, 2022 @02:37AM (#33017202)
I guess you are right:

  du -h -d0 Xcode.app
  12G Xcode.app
Re:macOS keeps a huge wallpapers cache by ChrisMarshallNY on Tuesday September 27, 2022 @07:59PM (#33002726)
I have a sidebar alias to my DerivedData directory (and I have Xcode set up to use it for everything).

I'll flush it, from time to time. I may also delete old archives. I have hundreds of them.

Re:macOS keeps a huge wallpapers cache by saagarjha on Tuesday September 27, 2022 @08:27PM (#33002905)
I would recommend being cautious about clearing old archives, as they will have symbols to help you analyze crash reports and such.
Re:macOS keeps a huge wallpapers cache by ChrisMarshallNY on Tuesday September 27, 2022 @08:59PM (#33003113)
Good point. I tend to keep the last month of releases, and whatever is currently on the store.

I find those symbols to be kinda worthless, though.

My best tool for diagnosing a crash report is a Ouija board.

Re:macOS keeps a huge wallpapers cache by saagarjha on Tuesday September 27, 2022 @11:40PM (#33003987)
Symbols are a godsend when dealing with difficult crash reports. Have you ever tried walking through the process of analyzing one with an expert? It's a great way to level up your diagnosis skills.
Re:macOS keeps a huge wallpapers cache by ChrisMarshallNY on Wednesday September 28, 2022 @05:28AM (#33006076)
That’s a good suggestion.

Frankly, it’s not been much of an issue. I tend to be super-anal about Quality, and post-release crashes are rare as hen’s teeth; which makes the ones that do happen, more important to diagnose.

I usually get a general idea of where the crash happens, and scanning the source, has always shown me the issue.

Re:macOS keeps a huge wallpapers cache by nicky0 on Wednesday September 28, 2022 @01:58AM (#33004689)
I usually just Google "how to symbolicate crash report" because I forgot how to do it it again.
Re:macOS keeps a huge wallpapers cache by saagarjha on Wednesday September 28, 2022 @05:25AM (#33006057)
Symbolicating a crash report is annoying but mostly mechanical (fwiw you can open them in Xcode and it will pull in all the dSYMs for you). Reading a crash report is an art.
Re:macOS keeps a huge wallpapers cache by alex_suzuki on Wednesday September 28, 2022 @07:29AM (#33006727)
You probably know this, but relying on your local machine and storage for this is a bad idea for production apps.

There are a ton of services that handle all the “mechanical” stuff for you (e.g. AppCenter, ex-HockeyApp), and you can just look at symbolicated crash in your browser.

Re:macOS keeps a huge wallpapers cache by saagarjha on Thursday September 29, 2022 @04:21AM (#33017816)
For production apps I would centralize symbols, yes. But I have a strong disdain for crash reporting services, which are typically authored by people who are designing for aggregating crashes and showing pretty charts rather than really getting deep into the actual log itself. Most have pitifully less information than an actual crash log would–often missing thread state, exception codes, and memory mappings.