Trimming the fat - here's how Apple is making iOS 9 & apps smaller in size

24comments
Trimming the fat - here's how Apple is making iOS 9 & apps smaller in size
As advanced operating systems become even more advanced, their physical footprint — that is, the amount of storage space they occupy on your device — usually grows. Storage space, though? Well, where smartphones and tablets are concerned, storage doesn't grow. It's 8 or 16GB for the base model, 64GB for the high-end version, and 128GB for deep-pocketed individuals.

The way things have been going 'till now, those on the bottom of the pyramid have been ending up with less user space after major OS updates. To provide an extreme and thoroughly fresh example of this tendency, owners of the new Sony Xperia M4 Aqua, the 8GB model, have exactly 1.26GB of user space available out of the box! Granted, the latest version of Android actually takes about half of that space, and Sony treated themselves to an additional 2GB of data to install...  ahem, Sony stuff. You can't do anything about it unless you root and void your warranty, but thankfully, where this particular model is concerned, users can pop in a cheap microSD card and go about their day!

That's not the case with the iPhone and iPad, though. The initial iOS 8 update was a 1GB download that could ultimately take up to 5 gigabytes of storage to install, depending on how up-to-date your device was prior to the installation. Owners of 8GB iOS devices who updated were in for a nasty surprise, as 3GB of spare space is very little in this day and age, especially when microSD is not an option.

With iOS 9, Apple has implemented several cures for this particular itch, which could leave both users and developers much happier than they used to be. At yesterdays WWDC keynote, we got to learn that the iOS 9 update should take as little as 1.3 to install when it's delivered over the air.

Recommended Stories
But what's making the otherwise lean and efficient iOS grow a bit of cushion here and there? For starters, the way apps are distributed on different devices is somewhat compromised, which is starting to pose an issue. When Apple bakes a stock app into iOS, or you grab one from the App Store, the download includes all assets scaled for literally all the iOS devices it supports. So you're using a 64-bit iPhone 5s with its 4-inch screen, and you download an app that also includes three times bigger assets made for the iPhone 6 Plus, along with 32-bit code for older devices. What's up with that? 

Of course, Apple realises the inefficiency of this method, which is why it designed iOS with so-called app thinning. App Thinning is a set of three mechanisms that developers can take advantage of to reduce their applications' file size without impacting the quality of the experience.

First, Apple is letting developers upload complete versions of their apps to the App Store, but the artwork is being tagged for different devices inside an Asset Catalog. The App Store reads into it and compiles a device-specific version of the app upon downloading. The potential data savings are significant across the entire iOS-powered spectrum.

Second, Apple is wheeling in On-Demand Resources. This allows a modular approach to designing apps, where specific chunks of content are being downloaded on the fly when they are needed, and then automatically flushed when they've served their purpose. In an example from Apple's documentation, a game is split into levels with individually tagged assets and developers can specify when they are needed and which pieces of content should be axed from the device first.

The icing on the cake is Apple's on-demand app compiling, which it named Bitcode. Developers no longer upload pre-compiled binaries, but rather an "intermediate representation" — probably a package containing the source code and resources —and this base gets compiled according to the user's device. An advantage of this workflow is that developers automatically benefit from the latest compiler improvements by Apple without having to resubmit or modify their apps. Bitcode is still optional for iOS apps, but compulsory for native Apple Watch apps.

And that's Apple's solution to the storage problem, in a nutshell. We'll see whether the effort has paid off this fall, when iOS 9 ships.

source: Apple, Ars Technica

Recommended Stories

Loading Comments...
FCC OKs Cingular\'s purchase of AT&T Wireless