4 ms·
Hmm. I appreciate the cute name for the project but I tested this on my machine (a Mac) and the results were not very impressive. I sacrificed a few of my SSD c
by saagarjha 4y ago
Hmm. I appreciate the cute name for the project but I tested this on my machine (a Mac) and the results were not very impressive. I sacrificed a few of my SSD cycles to test how this is on deleting Xcode (for those unaware, it's a 11 GB mess of several hundred thousand files of varying sizes). Here are the results:
$ time rm -rf Xcode.app
real 0m39.850s
user 0m0.429s
sys 0m29.153s
$ time rmz Xcode.app
real 0m36.476s
user 0m1.468s
sys 1m59.916s
It's a little bit faster, but not by much. Despite claims that it runs in parallel, it seems like it really just hits unlink on many more cores and contends on the kernel's filesystem spinlocks rather than doing useful work. So the end result is that rm uses 70% CPU and rmz uses 400% CPU and they basically end up doing the same thing.
(FWIW, I don't use rm when deleting Xcode anyways, because it takes long and I do it too often. When testing unxip I just have it write to a temporary APFS volume and wipe it in between runs, which takes all of 10 seconds.)
- eru 4y agoSlight tangent: why do you need to delete Xcode so often? (I don't really develop on Mac, mostly on Linux.)
- oefrha 4y agoThey develop https://github.com/saagarjha/unxip https://github.com/saagarjha/unxip, “a fast Xcode unarchiver”. Very few people should routinely delete Xcode.
- eru 4y agoThanks!
- LeoPanthera 4y agoNot OP, but disk space maybe? It's pretty big. $ du -Ash Xcode.app 22G Xcode.app
- saagarjha 4y agoXcode is compressed on disk by default; you should generally use du -sh when measuring its size.
- guessmyname 4y ago> Not OP, but disk space maybe? It's pretty big. > $ du -Ash Xcode.app > 22G Xcode.app My installation of Xcode only takes up 3.6G and is still fully operational. As a developer of both desktop and mobile apps, I discovered some time ago that I could delete most, if not all, of the Xcode simulators that I don’t use without affecting the functionality of the IDE. The software is smart enough to download additional assets when you attempt to launch one of the simulators. I believe that, by default, Xcode comes with simulators for the latest versions of iOS, iPad OS, Watch OS, and Apple TV, sometimes including two or three versions for each platform. I think this is the reason why your installation weights 22G.
- saagarjha 4y ago3.6 GB is pretty small. What did you remove from your installation?
- blowski 4y agoNot the OP’s reason it seems, but I have to delete Xcode quite more frequently than you’d think because it gets into a weird state during updates. This seems to happen once or twice every year.
- mort96 4y agoI had to delete xcode because an update through the app store just didn't work. It had been in an "updating" state for over a week, I had given the machine full working days worth of continuous on-time, and eventually I tried to cancel the update which also didn't work. The only recourse was to `sudo rm -rf /Applications/Xcode.app`. Not the reason OP is deleting Xcode, but you'd be surprised at how buggy a lot of stuff involving Xcode can be.
- oefrha 4y agoApp Store Xcode updates always take forever for god knows why. It’s almost as if there’s some nonlinear behavior in softwareupdated and co. that’s hit by Xcode with its gazillion little files. Therefore I update Xcode by downloading the .xip from developer.apple.com/downloads.
- saagarjha 4y agoI haven't looked into this closely but I think it first tries to validate the bundle and then decompresses to disk very slowly
- tyingq 4y agoThe benchmarks page[1] for rmz shows it does pretty well on Linux, with many cases of 1.5x-4x vs "rm -rf". Perhaps something about Linux, or the filesystem type that was used to develop, test, and tune it. [1] https://github.com/SUPERCILEX/fuc/tree/master/comparisons https://github.com/SUPERCILEX/fuc/tree/master/comparisons
- jabl 4y agoThere has been a huge amount of work done on Linux over the years to increase parallelism in the VFS and in the common filesystems like ext4, XFS and btrfs. I would guess that macOS, being targeted at desktops and the typical workloads being run on them, hasn't received the same level of scrutiny in this particular area.
- AlpineG 4y agoLook at user and system times in your test. rmz seems much worse by that measure, particularly syscalls its 4x more time for 4x the number of cpus, maybe a link there. evidently it is multi threaded and as you say causes contention.
- SUPERCILEX 4y agoI added a clarification to the benchmarks section: "The macOS/Windows implementations are currently equivalent to the *_rayon implementations shown in the benchmarks." Rayon is pretty good, but clearly suboptimal as evidenced by the benchmarks.