How does Apple make iOS 12 run faster on the iPhone

With the opening of WWDC 2018, Apple announced the new iOS 12 during the keynote speech and introduced many new features and improvements. According to previous experience, the new system will often slow down the reaction of the old iOS, resulting in some people do not like to chase new upgrades or force everyone to buy a new machine and improve Sales Performance. What did not come to mind was that after experiencing a beta version of iOS 12, many people said that they were “smooth and unremarkable.”

As it turns out, Apple really did a lot of work on iOS 12 optimization. It also improved performance and speed while also reducing memory consumption. This means that the existing devices, especially the next generation of A-series chip-driven new iPhones and iPads, will bring a qualitative leap forward.

Image: Apple

In order to help ordinary users understand what aspects of iOS have improved, here are the key points to explain the next few points. Interested friends can also refer to the “What’s New in Cocoa Touch” document that was introduced during WWDC 2018.

“iOS 12 enhances the Cocoa Touch frameworks to improve app performance and deliver exciting new features.”

In addition, a Reddit user perfectly explained the content of Apple’s speech and analyzed how iOS 12 (at least in theory) brought about a faster app experience.

  1. An oversight within the Cell Pre-fetch API causing dropped frames has been fixed. This was an API introduced in iOS 10 intended to help solve frame drops, particularly those that were the result of loading heavy data within an upcoming cell during a scroll. The idea was that you could pre-load the data (say, a large image coming up before it’s made it to the screen upon scroll) in the background so by the time the cell is on screen, the data is already loaded and the CPU performance of the active scrolling thread remains unaffected
  2. Apple has identified and corrected an issue in the CPU performance controller causing dropped frames even when there was very little background load. This one is an even bigger win for performance in iOS 12. Previously, when an app would alert the system that there was a big load coming up during a scroll and it needed more CPU performance, the CPU was quite slow to respond and increase its clock speed. In fact, by the time the CPU was at a higher speed state, it was often too late and the frame was already dropped. This has been fixed, and is actually what Craig was referring to at the main keynote.
  3. The auto-layout framework has been heavily optimized to substantially increase performance. Auto-layout is what allowed Apple to begin targeting different screen sizes and shapes in iOS. It controls how most UI elements, text, and content are laid out on the display by automatically controlling spacing for the many different iDevice screen sizes, without requiring the developer to completely redesign an app to support a new screen size.

Craig Federighi hinted during the presentation that after the optimization, the CPU has been able to increase the speed of response, increase the constant rate of processing extra work, and return to idle as quickly as possible to ensure that battery life is not affected.

iOS 12 also significantly optimizes the auto-layout framework, allowing iOS to automatically arrange app elements on the screen, regardless of device type (such as iPhone/iPad), saving developers extra work. 

In this way, iOS 12 cleverly freed up the resources of the CPU and GPU, allowing them to play a more important role elsewhere.
In addition, iOS 12 will also allow the app to use less memory when performing tasks.  Apple Insider details this improvement. It is called Automatic Backing Stores. By using the depth definition file instead of the contents inside, it can reduce memory usage. For example, Apple showed a pair of color and grayscale photos on the stage, but both consumed the same amount of memory.
While Android vendors are desperately building on RAM capacity, Apple still values ​​the optimized experience:

There are already a lot of Android flagship devices on the market with 6GB or even 8GB of RAM, but this year’s launch of the A12 iPhone model may have 3GB of RAM for the entry model and 4GB of RAM for the high-end model.
Source: BGR