

The Care and Feeding of the Android GPU - buymorechuck
http://www.satine.org/archives/2011/01/01/the-care-and-feeding-of-the-android-gpu/

======
wccrawford
This isn't the first thing I've seen that Google devs really just didn't get.
I think it's from the rapid expansion that Google has done. They get people
working on things that aren't really their area of expertise because they
wanted to try something in their 20% time.

In this case, it's obvious that we've got server people working on mobile
code. Future hardware will resolve these inefficiencies? UGH. That's
definitely someone from the server world speaking.

~~~
jrockway
But the thing is, nobody actually cares about this. I have used an Android
phone since the beginning. Touch responsiveness is not something I have ever
noticed. Any delay in rendering web pages is due to the network.

I think people that write articles about touch responsiveness or animation
latency are suffering from the "benchmarking hello world" problem. Yeah, you
could speed that stuff up. But 99% of the time, the phone is waiting for data
on a socket, which is not going to get fast any time soon.

~~~
pkulak
People care, they just don't know what to call it. People who use iPhones try
out an Android device and say things like "it's just not as polished", or just
notice that it doesn't feel right. That "not feeling right" is because when
you scroll on an iPhone it really feels like there's a piece of paper under
the screen that your physically moving around with the tip of you finger. With
Android it just feels like your finger is telling a computer what to do, which
is in turn doing a reasonably good job of doing it.

~~~
danudey
Twelve years ago or so, I was reformatting my home desktop (then a Linux
machine) and I decided to try to change things up a little, so I installed
FreeBSD to try it out. I figured that there wouldn't be any superficial
differences, but I knew that there were architectural ones that I'd run into
eventually and maybe I could learn a little more about how different OSes
worked.

One thing I did notice right away was that the console felt different. It felt
like it was maybe more responsive somehow, and not just when it was scrolling
a wall of text. It even felt different when I was typing. Somehow, typing at a
console (not in X, not via SSH) _felt_ better in FreeBSD than it did in Linux.
I couldn't tell you why, and I didn't really understand it myself. It wasn't
something I could measure, or even describe, but it left me feeling like
FreeBSD was more than 'just like Linux'.

I only used it for a day or so before I realized that I'd screwed up the
partitioning and wiped out my Windows partition, and so had to re-reformat,
but it left a profound impression.

I feel like iOS is the same way. All the Android phones I've tried (including
a friend's Nexus One) have been, theoretically, the same as an iPhone in terms
of features and capabilities and even hardware, but even before I got into
using them in depth there was just something that felt a little off about
tapping on icons or scrolling lists, and I could never put my finger on it, so
to speak. Perhaps it's just design decisions or usage patterns that I'd
internalized already, but I've always felt like it was something more. Maybe
the scrolling behaviour is something I picked up on unconsciously, because
while I don't remember it being slow or jerky, I do remember it didn't _feel_
right.

Perhaps the numbers-oriented engineers at Google can't quantify it and so
don't prioritize it, or maybe they just don't think it's worth wasting time
on, but I think consumers, in the end, will notice. The real question is how
many will actually care, and how many will shrug it off because of the
benefits (perceived or real) that Android provides them over the iPhone?

~~~
mikeklaas
Wow, I totally had the same experience with FreeBSD about 15 years ago. I have
no idea if it persists on modern hardware, though.

Does anyone have a good explanation for this?

~~~
biafra
At that time the FreeBSDs scheduler was much better than Linux'. I had the
same feeling about FreeBSDs responsiveness.

I had a similar perception with Solaris on SPARC. It was slower overall but
more responsive when interacting on the shell. Sometimes I had high load (10
or more) and did not notice when using a shell in a terminal.

I think Linux got much better since then. I don't feel the difference on
current FreeBSD, Solaris or Linux installations.

------
comex
Anyone who thinks Android's animation is "fast enough" is either using a
faster device than I have ever tried, or has never tried to compare, say,
scrolling lists versus the iPhone.

I'm not saying the GPU is the answer, and maybe 2.3 is the answer, but
ignoring the problem is not.

(Edit: So why does a GC pause stop animation, and not just by taking up CPU
time, since moving to the GPU would help in that case? Is the animation code
itself written in Java and waiting on the GC? If so, I bet rewriting it in C
would be a massive help. Also, yuck.)

~~~
ulrich
Gingerbread has a concurrent GC, so animation should not stop completely.
However, on a single core system I wouldn't expect this to have a huge impact.
But this is just my personal guess.

------
wzdd
Apparently touch responsiveness is improved in 2.3. However this article
doesn't really explain what's wrong with it. I've been doing latency
benchmarks for touch recently, and the highest latency I've seen for touch
delivery is 10ms. Now 10ms is pretty terrible for what should be a very
straightforward thing, but on the other hand it's only 2/3 of a frame, at 60
FPS.

The argument in favour of a GPU-accellerated GUI which is not mentioned here
is battery life. I haven't been testing this side of things, but just because
a CPU can do a 60 FPS GUI doesn't mean it should. Deferring it to the GPU
would certainly reduce power consumption while navigating a UI. Whether this
is non-negligible in terms of overall battery life, I'm not sure.

~~~
tgflynn
Are those 10ms with a realistic app/usage scenario ? I wouldn't think users
would complain about 10ms, isn't that below the threshold of perception ?

~~~
wtallis
A stutter 2/3 of a frame long means there's a 2/3 chance that you'll draw a
frame that doesn't match the current finger position, followed by a frame that
catches up more than it should have had to.

The ~40ms input lag shown by most desktop IPS LCD monitors is noticeable even
though it falls below the reaction time. On a touch display, it should be even
easier to notice input lag, because you can see your finger moving and the
screen around it not keeping up. 10ms sensor lag may be below the threshold of
perception for circumstances like this, but probably not by much. If you add
even a few milliseconds of processing lag after your app receives the touch
event, you'll be behind by a frame.

------
yoden
I think the android bug linked in the article is much more informative than
the article itself.

Basically: 1) Android phones can already animate the screen @ 60 fps in
software in most cases. 2) When they can't, it's not because the CPU is too
slow, it's because there is other stuff happening (GC, etc.). A GPU can't fix
that.

~~~
buymorechuck
The GPU can offload most of the graphics intensive tasks from the CPU,
utilizing the GPU instead of letting it sit idle. freeing the CPU to focus on
GC tasks. In addition, most of the animation work done with Dalvik code can be
moved into a dedicated thread / task with highly optimized code backing it.

------
dave1619
I think the author nails it. Without GPU acceleration Android really is a
notch below iOS in terms of UX. In my opinion, even WebOS and Windows 7 have
much smoother scrolling and touch response than Android. But if Google wakes
up and adds GPU acceleration and better eye-candy, watch out Apple.

------
simonh
Purely by chance, I was trying out a galaxy tab at a store today. I loaded up
the Financial Times web site, which took an age because the store wifi was
crap and tried scrolling the web page and it stuttered quite a bit at first
then smoothed up, zooming as juddery as well. Did the same thing on an ipad -
slow loading about the same, but the instant the page was rendered it scrolled
and zoomed perfectly.

Also the widget for editing the web page URL on the Tab was a horrible
usability car crash. What's up with that? Disclosure - iPhone user, but
Android curious.

------
typo_pl
Android's VM can improve perf-wise - see
[http://blogs.oracle.com/javaseembedded/2010/11/how_does_andr...](http://blogs.oracle.com/javaseembedded/2010/11/how_does_android_22s_performance_stack_up_against_java_se_embedded.html)

------
michaelward82
It doesn't matter what the solution is, but Google need to prioritise UI
responsiveness above all else. Until that happens, the UI on Android will
suck.

------
asdasdrasdasdr
What is the main performance difference between Vista SP1 and Windows 7?
Hardware accelerated UI.

