Mac Office 2016 – Saving some Space

For the past 3 years, my primary laptop has been a MacBook Air. Technically, it is a Mid 2012, 11-inch MacBook Air. It is a very agile little machine - I can do all of my development on it, plus play the occasional game (albeit at minimum settings). But the one thing that constrains it the most, just like every Apple product I have owned, is the storage. It has a measly 64GB SSD, of which 55GB is usable (according to df -h). This usually isn't that big of a deal. I keep games on a 256GB USB3 stick, and I don't have a lot of music on the drive. But as applications continue to grow and grow, free space on the main drive becomes more of an issue. So, leave it to a combination of Apple and Microsoft to cause the latest version of Office to consume over 1GB per application.

My understanding of this is that Microsoft eventually will offer Office on Apple's App store. In order to do this, the application has to be entirely self-contained. Libraries, assets, fonts, and the like have to be bundled inside the ".app" folder, inside of /Applications.

I have not gone to lengths such as using a tool to use filesystem links to remove the duplicate files, but there is a tool out there to reclaim some of that space.: afsctool. This tool can apply HFS+ compression to files in a given directory.

Here are the results after compressing 3 Office applications, as well as one other big user of space, Photoshop.

sudo afsctool -c -v -m 5000000 -9 -s 30 Microsoft\ OneNote.app/
/Applications/Microsoft OneNote.app/:
Number of HFS+ compressed files: 8184
Total number of files: 8841
Total number of folders: 1102
Total number of items (number of files + number of folders): 9943
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 723768149 bytes / 748 MB (megabytes) / 713.4 MiB (mebibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 557762179 bytes / 564.5 MB (megabytes) / 538.3 MiB (mebibytes)
Folder size (compressed): 562638505 bytes / 569.4 MB (megabytes) / 543 MiB (mebibytes)
Compression savings: 22.3%
Approximate total folder size (files + file overhead + folder overhead): 574491514 bytes / 574.5 MB (megabytes) / 547.9 MiB (mebibytes)

sudo afsctool -c -v -m 5000000 -9 -s 30 Microsoft\ Excel.app/
/Applications/Microsoft Excel.app/:
Number of HFS+ compressed files: 16147
Total number of files: 18065
Total number of folders: 1724
Total number of items (number of files + number of folders): 19789
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 1553993866 bytes / 1.6 GB (gigabytes) / 1.49 GiB (gibibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 1259573245 bytes / 1.28 GB (gigabytes) / 1.19 GiB (gibibytes)
Folder size (compressed): 1268563896 bytes / 1.29 GB (gigabytes) / 1.2 GiB (gibibytes)
Compression savings: 18.4%
Approximate total folder size (files + file overhead + folder overhead): 1297012191 bytes / 1.3 GB (gigabytes) / 1.21 GiB (gibibytes)

sudo afsctool -c -v -m 5000000 -9 -s 30 Microsoft\ Word.app
Applications/Microsoft Word.app:
Number of HFS+ compressed files: 22499
Total number of files: 24031
Total number of folders: 1756
Total number of items (number of files + number of folders): 25787
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 1725058307 bytes / 1.79 GB (gigabytes) / 1.67 GiB (gibibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 1398699918 bytes / 1.42 GB (gigabytes) / 1.32 GiB (gibibytes)
Folder size (compressed): 1409863650 bytes / 1.43 GB (gigabytes) / 1.33 GiB (gibibytes)
Compression savings: 18.3%
Approximate total folder size (files + file overhead + folder overhead): 1443558292 bytes / 1.44 GB (gigabytes) / 1.34 GiB (gibibytes)

sudo afsctool -c -v -m 5000000 -9 -s 30 Adobe\ Photoshop\ CC\ 2015.app/
/Applications/Adobe Photoshop CC 2015/Adobe Photoshop CC 2015.app/:
Number of HFS+ compressed files: 5237
Total number of files: 6116
Total number of folders: 2250
Total number of items (number of files + number of folders): 8366
Folder size (uncompressed; reported size by Mac OS 10.6+ Finder): 1617153055 bytes / 1.63 GB (gigabytes) / 1.52 GiB (gibibytes)
Folder size (compressed - decmpfs xattr; reported size by Mac OS 10.0-10.5 Finder): 1212461937 bytes / 1.22 GB (gigabytes) / 1.14 GiB (gibibytes)
Folder size (compressed): 1216194207 bytes / 1.22 GB (gigabytes) / 1.14 GiB (gibibytes)
Compression savings: 24.8%
Approximate total folder size (files + file overhead + folder overhead): 1225972094 bytes / 1.23 GB (gigabytes) / 1.14 GiB (gibibytes)

Summary:

Application Uncompressed Space Space After Compressing
One Note 0.748 GB 0.569 GB
Excel 1.6 GB 1.29 GB
Word 1.79 GB 1.43 GB
Photoshop 1.63 GB 1.22 GB
Total 5.768 GB 4.509 GB

By apply HFS+ compression on four large applications, I was able to reclaim about 1.2GB of space on my 64GB SSD.

One note: my understanding of HFS+ compression is compressed files are decompressed to RAM on the fly, thus resulting in higher memory usage. This Mac only has 4GB of RAM, and so far I have not been constrained by memory, but YMMV. I have not compressed the tools I use the most, such as Chrome, Firefox and IntelliJ.

 

Leave a Reply