Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bcodemz

macrumors member
Original poster
May 6, 2014
53
41
iOS UI lag on any device, even the iPad 2, iPhone 4, etc, is NOT because of hardware problems. It is a software problem.

Think about this. If the hardware is not capable of even 2D scrolling, how is it playing games, with FAR more complicated graphics even remotely smoothly, in 3D? 3D games are an order of magnitude more computational heavy than the simple 2D animations in iOS. Not only games are doing all these visual effects, it is also being heavily taxed by things like AI for characters and bosses. The computational complexity of the animations and fly-ins and blur in iOS is a joke compared to games, yet they're running very smoothly.

Point: iOS animations, blur, etc does not lag on old devices because the hardware is too weak, it is because the software is poorly optimized.

So why does animations lag on iOS? The very simplified explanation is that Apple is using CPU to handle a lot of the animations. iOS animations used to be done on the GPU, and this is how the iPhone 1 has perfectly smooth animations 8 years ago with hardware ~80 times slower than the current 6S. GPU's are far better at handling animation than CPU's. However, this came at a cost of battery life because the GPU cannot go into low power mode in order to instantly respond to animation requests, so it drew more power.

Some time a few years ago, I believe it was around iOS 6, Apple decided that mobile CPU's were powerful enough to handle the animations, and that it was more power efficient to let the CPU to spike in usage (and power) for a brief moment than keeping the GPU on (really a higher power state instead of a deep sleep) all the time. However, CPU's are much slower at handling animations, and can easily eat up most of the CPU's processing power, but they considered it "good enough", and at that time, on the latest hardware, it was. However, as iOS got bigger and bigger, the frameworks dependencies started really piling up, and it took a toll on the performance. And unfortunately we have this lag fest on iOS. I really wish Apple will revert back on using the GPU, on both iOS and OS X, as it really helps animation. Ever wonder why Windows 8 animations are so smooth and so much smoother than Windows 7? It's because they rewrote most of their UI to be hardware accelerated (i.e., GPU). Unfortunately, marketing dictates that lower battery life is bad... So we have to deal with this.

BTW: for those interested, here's a link of a very lengthy Microsoft blog detailing the use of GPU for animations in Windows 8

https://blogs.msdn.microsoft.com/b8/2012/07/23/hardware-accelerating-everything-windows-8-graphics/
 
Last edited:

sanke1

macrumors 65816
Nov 9, 2010
1,067
436
Good twist on the story. But I still believe that all the animations in iOS are still done by gpu and handled by metal API. In fact, if CPU does the animations using software emulation, it consumes more battery.

This is PO at it's finest. Otherwise a sloppy coding.
 

Hastings101

macrumors 68020
Jun 22, 2010
2,355
1,482
K
Is this where I say "I rarely have any noticeable lag on my 5S" and you respond with "You're blind" and it turns into a flame war :p. Besides, this doesn't look perfectly smooth.

The iPad 2 and iPhone 4 are relatively ancient. Maybe the last couple of years mobile tech finally reached the "usable until it's dead" point of laptops/desktops for the average person. It definitely wasn't there when they were released. iOS changed its use of resources. That's life. Sucks for iPd2/iP4 owners. Apple should have left them on iOS 6 when the redesigned iOS 7 came out. Sucks to own a computer that came before Core2Duo, sucks to own a mobile device that came before Snapdragon S4/Apple A6. Buy a new one.
--
I think you're 100% right that any lag issues on recent iPhones/iPads are due to the use of the CPU (and maybe bugs in Metal) to render the UI, as seen by a lot of people with Yosemite, but on those devices battery life is pretty important and with Apple's obnoxious "thin" obsession there's not much alternative. They're not gonna reduce battery life for hundreds of millions of users.
 

Zirel

Suspended
Jul 24, 2015
2,196
3,008
Another thread of more of the same?

Where did you get that blur and transparency were done in CPU? Because they are not.

Where did you get that you could do animations in the GPU? Because you can't.

The iPad 2 and iPhone 4 were always slow, because they are old. Of course back then they were new and fast.
 

Ashin

macrumors 6502a
Jun 19, 2010
959
201
There obviously is something wrong with iOS9 though.

My wife's iPad Mini 1 on 8.4.1 performs better than the latest iPad Mini's in the Apple store running iOS9, which just feels sluggish and stuttery
 
  • Like
Reactions: trifid

Radon87000

macrumors 604
Nov 29, 2013
7,777
6,255
iOS quality standards have dropped ever since Jony Ive and Tim Cook took over.I have a hunch its planned obsolescence at its finest.My iPad Mini 1 is a stutter fest on iOS 9 but it's playing Real Racing 3 with less lag than the OS itself.Just LOL
 

lchlch

macrumors 6502a
Mar 12, 2015
503
153
iOS UI lag on any device, even the iPad 2, iPhone 4, etc, is NOT because of hardware problems. It is a software problem.

Think about this. If the hardware is not capable of even 2D scrolling, how is it playing games, with FAR more complicated graphics even remotely smoothly, in 3D? 3D games are an order of magnitude more computational heavy than the simple 2D animations in iOS. Not only games are doing all these visual effects, it is also being heavily taxed by things like AI for characters and bosses. The computational complexity of the animations and fly-ins and blur in iOS is a joke compared to games, yet they're running very smoothly.

Point: iOS animations, blur, etc does not lag on old devices because the hardware is too weak, it is because the software is poorly optimized.

So why does animations lag on iOS? The very simplified explanation is that Apple is using CPU to handle a lot of the animations. iOS animations used to be done on the GPU, and this is how the iPhone 1 has perfectly smooth animations 8 years ago with hardware ~80 times slower than the current 6S. GPU's are far better at handling animation than CPU's. However, this came at a cost of battery life because the GPU cannot go into low power mode in order to instantly respond to animation requests, so it drew more power.

Some time a few years ago, I believe it was around iOS 6, Apple decided that mobile CPU's were powerful enough to handle the animations, and that it was more power efficient to let the CPU to spike in usage (and power) for a brief moment than keeping the GPU on (really a higher power state instead of a deep sleep) all the time. However, CPU's are much slower at handling animations, and can easily eat up most of the CPU's processing power, but they considered it "good enough", and at that time, on the latest hardware, it was. However, as iOS got bigger and bigger, the frameworks dependencies started really piling up, and it took a toll on the performance. And unfortunately we have this lag fest on iOS. I really wish Apple will revert back on using the GPU, on both iOS and OS X, as it really helps animation. Ever wonder why Windows 8 animations are so smooth and so much smoother than Windows 7? It's because they rewrote most of their UI to be hardware accelerated (i.e., GPU). Unfortunately, marketing dictates that lower battery life is bad... So we have to deal with this.

BTW: for those interested, here's a link of a very lengthy Microsoft blog detailing the use of GPU for animations in Windows 8

https://blogs.msdn.microsoft.com/b8/2012/07/23/hardware-accelerating-everything-windows-8-graphics/

You conveniently forgot to mention that the 6s is pushing 7x more pixels than the first iPhone.
 

JT2002TJ

macrumors 68020
Nov 7, 2013
2,068
1,397
you guys new to hardware shelf life?

iOS 9 issues on older devices are because the software was not optimized to run on older iOS devices, not because the hardware is obsolete (a 2-3 year old computer/phone should not be considered obsolete). If the device was not capable of running the OS smoothly, then they shouldn't have allowed it to be in the upgradeable group. Since they did, Apple should have made sure it ran better they previous OS' on that device.

There are far more users of older (not the latest) iOS devices then the latest, Apple can not sustain their successful brand if every time an new OS comes out they alienate majority of their customers. They really need to slow down with the upgrades, slow down and work out the kinks. Apple has always been known for having the most stable OS', they are allowing other OS' to not only catch up, but surpass.

I will still give Apple the respect of the best all-around hardware. It might not have the best and newest features, but you can count on it being the best executed.

I would gladly pay for iOS updates, if I knew I didn't have to deal with the limitations of the X.0-x.3 issues... My iPhone 6+ is just finally becoming acceptable again since the release of 9.2.1, I still have issues here and there, but it is finally getting closer to 8.4.1.
 

vertsix

macrumors 68000
Aug 12, 2015
1,870
6,141
Texas
Yes, but it really is all a combination of advancing software and aging hardware.
 
Last edited:
  • Like
Reactions: iLG

bushido

Suspended
Mar 26, 2008
8,070
2,755
Germany
i dont see any lag on my iPhone 6 or iPad Air 2 and never have :) maybe i am just lucky or care less about these things :D i didnt even find anything to complain about iOS 8
 

Radon87000

macrumors 604
Nov 29, 2013
7,777
6,255
There obviously is something wrong with iOS9 though.

My wife's iPad Mini 1 on 8.4.1 performs better than the latest iPad Mini's in the Apple store running iOS9, which just feels sluggish and stuttery
The thing regarding the iPad Mini 1 which gets me is that games like Subway Surfers,RR3,Asphalt 8 run amazingly well for such a device.In fact games run better than those $100 Android tablets but for some weird reason the OS itself actually runs a whole lot worse than Android tablets.How can the OS be harder to run than a 3D game
 
  • Like
Reactions: sanke1 and Isamilis

Ashin

macrumors 6502a
Jun 19, 2010
959
201
The thing regarding the iPad Mini 1 which gets me is that games like Subway Surfers,RR3,Asphalt 8 run amazingly well for such a device.In fact games run better than those $100 Android tablets but for some weird reason the OS itself actually runs a whole lot worse than Android tablets.How can the OS be harder to run than a 3D game
Have you tried iOS9.3 beta 2?

Since you're already on iOS9 you may as well if not already.

It's WAY better than any previous version of iOS9
[doublepost=1454083939][/doublepost]
Yes, but it really is all a combination of advancing software and aging hardware.

I think the point is some really basic 2D animations shouldn't lag.

Scrolling through Settings for example - there really is no excuse for it to lag, especially not "aging hardware".
 

Krevnik

macrumors 601
Sep 8, 2003
4,101
1,312
So why does animations lag on iOS? The very simplified explanation is that Apple is using CPU to handle a lot of the animations. iOS animations used to be done on the GPU, and this is how the iPhone 1 has perfectly smooth animations 8 years ago with hardware ~80 times slower than the current 6S. GPU's are far better at handling animation than CPU's. However, this came at a cost of battery life because the GPU cannot go into low power mode in order to instantly respond to animation requests, so it drew more power.

Citation needed.

Some time a few years ago, I believe it was around iOS 6, Apple decided that mobile CPU's were powerful enough to handle the animations, and that it was more power efficient to let the CPU to spike in usage (and power) for a brief moment than keeping the GPU on (really a higher power state instead of a deep sleep) all the time. However, CPU's are much slower at handling animations, and can easily eat up most of the CPU's processing power, but they considered it "good enough", and at that time, on the latest hardware, it was. However, as iOS got bigger and bigger, the frameworks dependencies started really piling up, and it took a toll on the performance. And unfortunately we have this lag fest on iOS. I really wish Apple will revert back on using the GPU, on both iOS and OS X, as it really helps animation. Ever wonder why Windows 8 animations are so smooth and so much smoother than Windows 7? It's because they rewrote most of their UI to be hardware accelerated (i.e., GPU). Unfortunately, marketing dictates that lower battery life is bad... So we have to deal with this.

Citation desperately needed.

Here's the thing that I've learned as an iOS / Mac developer who has also spent time working in Windows developing on .NET there. Nothing you've said here is correct at all, based on what we at work have encountered. The CPU is not being used to draw the animations at all. Apple's UI engine on iOS has always sat on top of some sort of acceleration (OGL ES, now Metal when possible), and the Mac has been doing the same since before 2005 on appropriate graphics cards (Quartz Extreme). This has not changed. And Core Animation sits on top of the same tech games use for their rendering, so that's not really the problem either. About the only thing gotten right is that that the CPU is the problem, but not because of render performance.

What you draw is still determined by code running on the CPU. Things like: what image do I need for this button? What is the state of this control? What is the rate this layer is traveling across the screen? Core Animation is the technology that both iOS and OS X use for these feats of super-smooth animation, and it is how UIViews on iOS are backed, ensuring that the UIView is always backed by a GPU texture. It does that job really well. However, there are caveats that can prevent good performance. In the case of how applications should behave, it tends to run counter to what makes for a smooth animation. The CPU and GPU must cooperate to make sure that any information needed for the next frame is ready quickly. If the CPU takes too long, that means the GPU is delayed. This is true in a game as well. If I fail to get the game world updated, textures made available to the GPU, etc, within the appropriate time, the frame is delayed and my frame rate drops. So as a game dev, I write my core loop to be as consistent as possible. Even if that means trading off things like texture fidelity, memory usage (caching more stuff) and so on. But for an application, this sort of optimization is not something developers are very good at being consistent with. Applications all behave differently, and there is no specific hard and fast rule here, since there is no world update loop that I can focus on like with games. I have to find each pain point that causes poor performance and address it individually. But that source is still very similar: taking too much time to do something on the main thread, which delays the next frame from getting drawn by Core Animation.

Another thing in app development is the idea of lazy loading. Don't load something until you need it. But in many cases, I want it before I start an animation. And it can be expensive to go fetch it from disk (flash) if it isn't in memory, or worse if I have to wait for inter-process communication (ask the music app what is currently playing). This contributes to lag. And then anything I'm trying to do while the animation is in process can introduce spikes between frames. Especially if that work is happening on the main thread (which is used to coordinate drawing with the GPU and receive user input). Legacy code in particular is very vulnerable to this sort of thing, since it may not be thread safe, so can't push the work off the main thread that cheaply in terms of engineering time. Doubly so when you consider that any one task basically has to be optimized on its own (Notification Center, Control Center, and Search all have different performance bottlenecks and so you can't simply fix them all with a single magic wand).

But for the short version: the GPU can't actually do much on its own without coordinating with the CPU. Good coordination leads to high frame rates. If the CPU is busy doing something else, or fetching something it needs to give the GPU, your frame rate will suffer. Games are not immune to this behavior either, but they have design patterns that take this into account. Applications have very different usage patterns that force you to optimize on a case by case basis. These sort of performance hurdles are better described as "what data do I need, and where does it live?" It isn't really about the animation itself, but other factors that prevent the CPU from coordinating with the GPU as frequently as it needs to for a high frame rate.

That said, if a particular effect is expensive or poorly supported by a particular GPU, it can produce its own slowdowns as you have to find a different way to produce the effect on hardware that can't simply do it as a shader, for example.
 

gwhizkids

macrumors G5
Jun 21, 2013
13,311
21,491
Citation needed.



Citation desperately needed.

Here's the thing that I've learned as an iOS / Mac developer who has also spent time working in Windows developing on .NET there. Nothing you've said here is correct at all, based on what we at work have encountered. The CPU is not being used to draw the animations at all. Apple's UI engine on iOS has always sat on top of some sort of acceleration (OGL ES, now Metal when possible), and the Mac has been doing the same since before 2005 on appropriate graphics cards (Quartz Extreme). This has not changed. And Core Animation sits on top of the same tech games use for their rendering, so that's not really the problem either. About the only thing gotten right is that that the CPU is the problem, but not because of render performance.

What you draw is still determined by code running on the CPU. Things like: what image do I need for this button? What is the state of this control? What is the rate this layer is traveling across the screen? Core Animation is the technology that both iOS and OS X use for these feats of super-smooth animation, and it is how UIViews on iOS are backed, ensuring that the UIView is always backed by a GPU texture. It does that job really well. However, there are caveats that can prevent good performance. In the case of how applications should behave, it tends to run counter to what makes for a smooth animation. The CPU and GPU must cooperate to make sure that any information needed for the next frame is ready quickly. If the CPU takes too long, that means the GPU is delayed. This is true in a game as well. If I fail to get the game world updated, textures made available to the GPU, etc, within the appropriate time, the frame is delayed and my frame rate drops. So as a game dev, I write my core loop to be as consistent as possible. Even if that means trading off things like texture fidelity, memory usage (caching more stuff) and so on. But for an application, this sort of optimization is not something developers are very good at being consistent with. Applications all behave differently, and there is no specific hard and fast rule here, since there is no world update loop that I can focus on like with games. I have to find each pain point that causes poor performance and address it individually. But that source is still very similar: taking too much time to do something on the main thread, which delays the next frame from getting drawn by Core Animation.

Another thing in app development is the idea of lazy loading. Don't load something until you need it. But in many cases, I want it before I start an animation. And it can be expensive to go fetch it from disk (flash) if it isn't in memory, or worse if I have to wait for inter-process communication (ask the music app what is currently playing). This contributes to lag. And then anything I'm trying to do while the animation is in process can introduce spikes between frames. Especially if that work is happening on the main thread (which is used to coordinate drawing with the GPU and receive user input). Legacy code in particular is very vulnerable to this sort of thing, since it may not be thread safe, so can't push the work off the main thread that cheaply in terms of engineering time. Doubly so when you consider that any one task basically has to be optimized on its own (Notification Center, Control Center, and Search all have different performance bottlenecks and so you can't simply fix them all with a single magic wand).

But for the short version: the GPU can't actually do much on its own without coordinating with the CPU. Good coordination leads to high frame rates. If the CPU is busy doing something else, or fetching something it needs to give the GPU, your frame rate will suffer. Games are not immune to this behavior either, but they have design patterns that take this into account. Applications have very different usage patterns that force you to optimize on a case by case basis. These sort of performance hurdles are better described as "what data do I need, and where does it live?" It isn't really about the animation itself, but other factors that prevent the CPU from coordinating with the GPU as frequently as it needs to for a high frame rate.

That said, if a particular effect is expensive or poorly supported by a particular GPU, it can produce its own slowdowns as you have to find a different way to produce the effect on hardware that can't simply do it as a shader, for example.

This!! ⬆️
 

iLG

macrumors regular
Sep 30, 2011
107
79
I do not see better performance on my iPad mini 1. Ever.
I have iPad mini 1 running 8.4.1 & an iPad mini 2 running 9.2.1 & access to iPad mini 4 running 9.2.
Biggest difference? That screen! iPad mini 1 was rushed, its 3 years old, I haven't even bothered to fix the cracked screen as it is now solely used for my 4WD maps.
iPad mini 1 is so old. Version 4 has same hardware as iPad air 2. Better hardware is better.

Newer software for just about anything with a rich UI is going to need more system resources because its running more stuff. If it wasn't made better (richer) then everyone would complain "nothing new has come out" or "this looks the same as the last version". Fixing bugs & leaving the UI the same for older hardware doesn't sell new iPhones- and people want new iPhones & they do buy new iPhones!
 

pat.b

macrumors newbie
Nov 20, 2015
22
18
I don't subscribe to the idea of planned obsolescence because even the newest devices, in some cases, are struggling with parts of iOS 9. I'm sure the issues with metal will be figured out with time.
 

XTheLancerX

macrumors 68000
Aug 20, 2014
1,911
782
NY, USA
Definitely software. I don't have anything to add with the CPU/GPU, what's handling the animations, but my iPad mini 2 was LEAPS AND BOUNDS better than 9.2.1 on 9.3b1 in terms of smoothness. App switcher was much much better although still had little issues, spotlight was perfect, better than 8.4.1, control center had improved... now beta 2 rolls around, spotlight is total garbage again, app switcher went down hill, everything got more sluggish. Really hope it doesn't stay this way for public release. I heard similar reports from iPhone 6 Plus users. However my iPhone 6 got better with beta 1, and made another leap forward with beta 2. Really odd stuff going on in the software department, I can tell they are making efforts though and tweaking stuff. Better than nothing.
 

Zirel

Suspended
Jul 24, 2015
2,196
3,008
Definitely software. I don't have anything to add with the CPU/GPU, what's handling the animations, but my iPad mini 2 was LEAPS AND BOUNDS better than 9.2.1 on 9.3b1 in terms of smoothness. App switcher was much much better although still had little issues, spotlight was perfect, better than 8.4.1, control center had improved... now beta 2 rolls around, spotlight is total garbage again, app switcher went down hill, everything got more sluggish. Really hope it doesn't stay this way for public release. I heard similar reports from iPhone 6 Plus users. However my iPhone 6 got better with beta 1, and made another leap forward with beta 2. Really odd stuff going on in the software department, I can tell they are making efforts though and tweaking stuff. Better than nothing.

Strange, I notice no difference on my iPad Air 1
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.