How about some Android graphics true facts?
plus.google.com
plus.google.com
It doesn't say _why_ GPU rendering isn't much faster than CPU rendering on Android, it doesn't say why using OpenGL adds 8 MB to the RAM overhead to a process (something I can hardly believe by the way), it glosses over the fact that even though you _could_ render some things at 60 fps using just the CPU, that still means these CPU cycles can't be used for anything else, it doesn't mention the fact that GPU rendering is almost always more power-efficient than CPU rendering, and it doesn't differentiate at all between _what_ can efficiently be rendered by the Android hardware rendering and _how_, besides making the distinction between compositing and 'rendering in a window'.
The final comment about memory bandwidth also makes little sense when talking about CPU rendering vs GPU rendering. Most mobile GPU's use some form of tile-based deferred rendering that allows the use of dedicated on-chip local buffers and efficient caching, to greatly reduce RAM bandwidth pressure. If anything suffers from constrained RAM bandwidth, it's CPU rendering.
From a technical perspective this article is a very naive analysis, at best.
I'm surprised that many people are still bashing UI responsiveness/performance. I've held and played with many devices (including, but not limited to, iphone 3 and 4) and I can't really say what's bothering so many people. For me, every android device that I've used in the last 2 years feels fast and responsive. I'll just go out and say that it's a non-issue for mainstream user.
Might also be why the "mainstream" is primarily using Apple iPads/iPods/iPhones vs the myriad of Android devices available.
What bothers people is that when you swipe from screen 1 to screen 2, there can be a > .5 second delay. It doesn't feel remotely "natural" for something that you're physically touching and supposedly interacting with.
I don't believe the reason for that is UI responsiveness (also, I don't agree with your 'primarily' assessment, but let's not chew on that). In my opinion, the differences are so small that UI performance just isn't an issue. There are other areas where iDevices are noticeably better compared to every competing device.
>What bothers people is that when you swipe from screen 1 to screen 2, there can be a > .5 second delay
Hm, I don't remember that ever happening to me in the last ~2 years with two devices that I've used most: nexus one and motorola defy. But ok, I grant you that it can happen. So what? I've also seen an iPhone freeze completely.
It frustrates me - there's so much I like about the OS that so many good things can be erased by leaving the visible perception of being slow.
As for a "reason" for people using Android: most of the people I know who use Android-based devices have "It's not Apple" as one of the top few reasons for using it.
That's funny. I use a Nexus S on a daily basis, and compared to my primary phones I've used over the last 3 years (iPhone 3GS, 4, and now 4S), the touch screen is awful.
The incontrovertible truth is that every mainstream Android device on the market, including the newest SGS2's, have this annoying 500ms/20 pixel touchscreen 'slop'. And it's annoying as hell. It makes the touchscreen and all the widgets feel slippery. It ruins the built-in android keyboard (I can type at 40+ words per minute on the ios5 touchscreen keyboard, and I need swiftkey if I want to type that fast on android).
Ignore this all you like. Those of us who want something better know where to get it.
But yeah, if you agree that that describes Apple to a T, or maybe a P, then "Not Apple, (or Microsoft, or ...)".
Which mainstream? Last time I looked Android market share was substantially higher than iOS.
http://articles.businessinsider.com/2011-11-15/tech/30400455...
I may be mistaken for what these stats show, since things are very confusing with Android vs iOS. Some places claim one way and other places claim the other. I think the ones that claim iOS have a larger share are counting iPhones, iPod Touches, and iPads. Here's two sources that show iOS having greater share:
http://www.bgr.com/2011/11/01/ios-market-share-balloons-in-o...
http://gs.statcounter.com/#mobile_os-ww-monthly-201011-20111...
The second one (not sure about the first) is getting their stats from web hits, so how accurate it is, I do not know. I think aside from Apple and Google, no one really knows the real market share.
http://www.comscore.com/Press_Events/Press_Releases/2011/4/A...
This is now 3 sources claiming iOS has greater share than Android, and even if they are a bit outdated, it's proof that the 60% share vs 15% share cited in many articles refers only to the phone wars (most articles I've seen eventually mentions the words "smartphone").
The BRG report is using one companies analytics product (which is embedded in apps). Plainly that is more popular on iOS than Android, but we've seen that before - most people on Android use Google Analytics, so 3rd party analytics aren't reliable when comparing them.
Those Comscore stats are nearly a year old. A more recent one shows Android at ~46%, iOS at 28%: http://www.bgr.com/2011/12/02/android-steals-blackberry-shar...
The Statcounter stats clearly show Android and iOS are within a couple of percent (note how Android was above iOS a month or two ago). Given that the iPAd is the most popular tablet on the market (and people browse the web on tablets a lot more than on phones) this makes it even more likely that Android is ahead in units.
Also, there are many factors at play as any Stats student knows. Simply making assertions that android users are misrepresented could be dangerous.
My position is that "mainstream" users - the type of people who care about the apps, docking stations, ubiquity of the platform, etc - also care about UI fluidity.
They ultimately, however, don’t matter†. If scrolling on one device makes me want to throw the device at the wall while on another device I don’t even notice that I’m scrolling, then that’s a problem.
I’m looking forward to trying out an Android 4.0 device to see whether I still want to throw it at the wall. That’s the only thing that matters to me. (Lagging is only part of the problem and occasional lagging really isn’t a problem. What always annoyed me much more was the delayed reaction. I swipe, nothing happens, the page scrolls. That’s extremely annoying.)
—
† They obviously do matter. Different implementations lead to different results. But only talking about the implementation and ignoring the results misses the point.
Android's Webview unfortunately requires a rewrite from scratch. It just doesn't work as soon as the webview is more than a static page. Css Animations don't play anywhere near fast enough, there are furious hardware acceleration glitches whenever the touch keyboard pops up, touch events are slow as hell, etc.
The article only touches the surface of the problems with the Webview component. At this point we don't care about scrolling. since one pretty much has to hack a custom Webview component just to avoid all the hardware glitches, display artifacts, buggy input handling, terrifying variations of performance from device to device...
Two exceptions: Audio latency. It is impossible to write certain classes of table applications for Android right now, because no priority was given to having a low-latency audio subsystem. Its at least as big a mess as display acceleration.
Meanwhile, at Apple, they would have got it right in version 0.1, and Steve Jobs would treated that as prototype quality and made the team do 10 better variations.
Meanwhile, the current generation of dual core Android phones have hardly any lag issues anymore.
So... laggy sometimes, but still smooth scrolling.
Every Android device I've tried (just tried a couple tablets at a Best Buy this week) have been consistently laggy (response times to swipes) and choppy scrolling.
Garbage collection has never had anything to do with poor UI performances, and everything to do with making poor code stutter. When the GC starts hitting your framerate, it means you are creating far too many objects and far too frequently. Before ICS, android implemented the incremental GC that runs more often but for "negligible" sub-1ms lengths.
If you absolutely need 60fps, make sure the GC never gets to do any work and start monitoring your own memory through buffers, just like you would in any other language.
Garbage Collection very slow on Android with latest stable line http://groups.google.com/group/v8-users/browse_thread/thread...
How can I avoid garbage collection delays in Java games http://stackoverflow.com/questions/2484079/how-can-i-avoid-g...
Avoiding garbage collection for smooth 2d animations Options
http://groups.google.com/group/android-developers/browse_thr...
Image tiling on Android, garbage collector slows down http://stackoverflow.com/questions/7916021/image-tiling-on-a...
Nothing beats primitives and buffers - the performance gap between the two methods is huge, that's true, but it's not a showstopper.
I don't recall gcs in other processes hurting my apps performances though. With that said, if I'm going to write a game, I'll make sure none of the threads in my process will trigger a GC past the loading/splash screen. This means no instanciations of any additional iterators, collections, Strings... The overhead of allocations is almost as bad for the framerate as the GC anyway.
Just FYI.
I can barely stand the, in my opinion, horrible mouse acceleration in OS X and knowing apple I can imagine that they feel that giving me the option to disable it isn't user friendly.
Am I the only person in the world for whom the inertia of a scrollable area at rest, tending to stay at rest _is_ what feels right?
I don't know the technical details (though I'd assume hardware acceleration is a big deal), but evidently Apple can achieve a good user experience while consuming far less resources. It's taken Android years, and I probably have to buy a new device.
I also develop some of the biggest apps on both platforms and know more about their internals than I'd like.
I'm replying to this: "It has a much higher resolution than iPhone 3GS. In fact, it has six times more pixels." That has zero to do with the article.
There's nothing in my answer that's incorrect. Sure, your Galaxy Nexus can now sort of scroll reasonably smoothly (the one on my desk is okay, but still lags). But that's because of the GPU which is something like 6x faster than the GPU in a 3GS. And the fast dual core CPU helps, too.
That doesn't mean that Android hasn't come a long way in ICS. But it'll never catch up to iOS in terms of rendering performance/latency. It's an impossibility due to the underlying architecture.
> That's irrelevant, since the GPU does all the heavy lifting.
The article: "There is still a limit to how much the GPU can do." (And the rest of that paragraph.)
Yes, having 6 times more pixes is very relevant. The GPU needs to be 6 times faster and have 6 times the bandwidth.
> I'm replying to this: "It has a much higher resolution than iPhone 3GS. In fact, it has six times more pixels." That has zero to do with the article.
Conclusion: You did not read the article - you just skimmed the first paragraph.
* I have up-to-date firmware. Maybe that helps.
The reason iOS is so silky smooth is because each view in UIKit is backed by a CoreAnimation layer which will be a pixel buffer in hardware. This means that if you move a UIView in iOS, no new rendering needs to be done of stuff that was "uncovered" by moving the view since each UIView has the full contents of its view stored in its CALayer. All that needs to happen is all of the layers are composited in their new positions which hardware will blazingly fast. However, as I understand it in Android, each Window (containing multiple Views) is one pixel buffer in hardware. Each view then draws in to that. This means that if you move a View in android, another view will be "uncovered" and since that area of the screen isn't stored somewhere, it has to go down the view tree rendering the now uncovered area of the screen. Even if that rendering is hardware accelerated, it's still going to be muuuuuch more work that just recompositing all the layers on the screen as in iOS, I mean imagine if there's text uncovered there? That's not going to be quick.
Now, there are downsides to iOS's approach - it uses a bunch more memory. But the upsides are basically what makes iOS good - all those silky animations. Android's just getting to a similar level of smoothness, but mostly only through better hardware.
(Caveat: How android works may have changed since I last looked, but that just makes the mystery of lack of smoothness even more interesting ;-) )
(Further reading: http://developer.android.com/reference/android/view/View.htm... )
Edit: Also, I missed where she said that in her post: "Starting with 3.0, if you set the flag in your app saying that hardware accelerated drawing is allowed, then all drawing to the application’s windows will be done with the GPU. The main change in this regard in Android 4.0 is that now apps that are explicitly targeting 4.0 or higher will have acceleration enabled by default".
Unfortunately only the the Samsung Galaxy Nexus has Android 4 and I'm not sure there's anything other than a few tablets that have Android 3?
Google suggests toggling between LAYER_TYPE_NONE & LAYER_TYPE_HARDWARE pre/post animations. This need to actively manage view cache behaviour probably leads to developers being unaware of what to do.
LAYER_TYPE_HARDWARE enables smooth hardware-backed scrolling but glitches badly when the soft keyboard is visible (no resizing/panning of the webview, multiple seconds of delay between key type and text updates inside textfield forms).
LAYER_TYPE_NONE makes scrolling in the webview unbearably stuttering, but at least the soft keyboard becomes responsive, the webview pans correctly to show the field in which you're inputting text, and the key types are instant.
On top of that, there is the problem that you don't have access to keyboard show/dismiss events, so you have to inject javascript code to catch those in every page you plan your webview to display. This is at least the case on the Motorola Xoom and the Acer Iconia tablets running the latest versions of honeycomb.
Doesn't this make Android look even worse? I.e., "Android already has hardware acceleration but still doesn't seem to perform very well" means any hope of flipping some magical GPU acceleration switch and instantly fixing the problem is gone.
I don't use any apple products but I get tired of Google touting how much better 4.0 is when most people are locked into phones running 2.2 or 2.3 for years into the future.
Way to take what started as a reasonable post and trash it with a needless, baseless insult.
The post spends pages on how hardware acceleration in android is just fine, but it completely ignores the actual problem. This is like a man in court for a DUI who bases his whole defense around the fact that he has a legitimate driver's license.
Going from Heinlein's razor, I assume that google does not know the cause of the problem. The alternative is that google is deliberately trying to mislead us by ensconcing the clunkiness issue within the hardware acceleration issue in the belief that by disproving the software acceleration claims they can nullify the elephant in the room: poor user interface performance.
There is still a limit to how much the GPU can do. A recent interesting example of this is tablets built with Tegra 2 -- that GPU can touch every pixel of a 1024x800 screen about 2.5 times at 60fps. Now consider the Android 3.0 tablet home screen where you are switching to the all apps list: you need to draw the background (1x all pixels), then the layer of shortcuts and widgets (let’s be nice and say this is .5x all pixels), then the black background of all apps (1x all pixels), and the icons and labels of all apps (.5x all pixels). We’ve already blown our per-pixel budget, and we haven’t even composited the separate windows to the final display yet.
I find this bizarre. Are all of these drawing operations using alpha blending (using translucency)? If so: is that strictly necessary for the entire area of all of them?
If they aren't using blending, why on earth do they have so much overdraw? The GPU could reduce that to touching each pixel exactly once by using the Z buffer and drawing in front-to-back order.
Just put any newest and fastest Android phone with dual-core CPU next to iPhone, or even worse WP7 which essentially works on two years old hardware, and everyone can see the difference. I don't care if it's software or hardware, I'm not interested in excuses about the work in the GUI thread. What I'm care is - the phone is something I touch. If I don't have immediate response to my gestures, the device is useless to me. As simple as that.
The post is relating facts about "how graphics rendering works on Android", it says so right at the top. I see absolutely nowhere that it says anything like "there's nothing wrong".
In the opinion of the referee, the ball did not cross the goal line between the posts and below the crossbar despite the ball actually doing so.
However the fact is in accord with the referee's opinion, not the actual path of the ball.
"When you refer to something as a fact or as fact, you mean that you think it is true or correct."
See also: http://www.thefreedictionary.com/fact
Although, the Wikipedia disagrees: http://en.wikipedia.org/wiki/Fact#Etymology_and_usage
This is not only a bad experience for users but also is one of the most difficult parts when developing Android apps.
http://www.google.com/events/io/2011/sessions/accelerated-an...
I think you're just repeating the meme of "lol Android graphics are bad" which hasn't been true for at least 2 years, even with relatively weak phones (like the Optimus X)
ICS definitely has little scrolling lag (tested on Nexus S)
I can understand why Andoid would have theirs set as they do, but I also understand how someone used to iOS could find it unpleasant.
It's all just software. The only thing that matters is how fast it is.
My point is, software is rendering the graphics. Either it's software running on one chip, or it's software on another chip. That's irrelevant. What matters, is how fast the graphics are rendered.
A crappy 'hardware' accelerated GPU can be slower than a 'software' framebuffer write.
My point was that saying "It's hardware accelerated" is meaningless marketing speak.
You're being shafted by downvoters who don't really know what they're talking about.
What's interesting is not only how fast the graphics are rendered, but the graphics performance compared to power usage. If the software stack doesn't give you a big performance / watt advantage when using a GPU, that's the fault of the software stack and will make that stack perform worse compared to one that does make use of hardware acceleration.
No, its not irrelevant. The terms have meaning, regarding the separation. And while it may technically be a misnomer, feigning ignorance to the misnomer to try and point out the misnomer to people who already know about it is not only arguing semantics, but doing so in least constructive way possible.
To address your other post that its all marketing speak, well no, not really. In discussions, what gets called hardware or software conveys meaningful information, but it is highly context sensitive to the bits being discussed at the time, because technically all computing is some combination of hardware and software.
Software rendering means that it's handled detail by detail by software on a general-purpose computation device.
Hardware rendering means that the software instead initiates complex actions on swaths of the screen at a time by triggering highly-specialized hardware.
One method is orders of magnitude faster than the other, but limited in scope. It's a fool's errand to try to conflate them.