The Pursuit of Efficiency
Alfred has always been engineered with efficiency in mind. Every line of code is carefully considered to ensure that it has a purpose, that there is no redundant code, and that it performs its intended task in the leanest way possible.
When updating Alfred's build and environment for macOS 27, one task on our list was to update the icons to free the hat from the squircle jail. Using Apple's Icon Composer app, I happily created the updated icons and bundled them within the app... only to double the size of the downloadable dmg. Urgh.
While many people may not be bothered by this, I am, so I started the process to work out how to reduce the size of the downloadable dmg and update tar. With a bit of fiddling and refinement on the main Alfred and Alfred Preferences icons, I managed to bring the download dmg back to 6.7MB, adding just 700k for the new icon.
Still disappointed that I'd added more than 10% to the download size purely for the app icon, I wanted to go further. Our minimum macOS version is now macOS 12, which affords us updated compression algorithms for the distributables.
From Alfred 6.0.4, the dmg now uses ULMO, bringing the dmg down to 5.2MB. For the update tar, this is now a tar.xz using LZMA2 bringing its size down to 4.6MB.
To iterate, that's around 5MB with no additional downloads for Alfred, the separate Alfred Preferences app, all the image resources, a visual Workflow editor, a new UI toolkit, a clipboard and snippet manager, and a whole load of other features you know and love!
I call that a good day's work!
Cheers,
Andrew
Let me know if you enjoy these little brain dumps and tech insights into Alfred's development. You'll find me lingering on the official Alfred forum.