> That's exactly what I was trying to do. The audio part can't be optimized
> anymore because it is native, so I tried to optimize the graphical part.

What I mean is that if you have so many views that it's negatively
impacting your application, you should try to reduce the number of
views.

> Dare I disagree? I am using home-made widgets and I monitor when they are
> redrawn. I found out that they were redrawn often, also when not needed. So
> I used a ViewGroup derived from AbsoluteLayout, stripped as much as
> possible. The superfluous redrawing now happens less frequently, but I
> wanted to optimize further.

Instead of trying to optimize further you should figure out exactly
why they are drawn so often. There is definitely nothing in the UI
toolkit that will redraw all visible views when "there is not enough
time to redraw some view." That's just not how the UI toolkit works.

> The code of drawChild() is complicated and does a lot of things that I do
> not need. That was the reason of my question.

It is complicated but in the common case most of that code is skipped.
It's only triggered when you use animations. Have you profiled your
app to see how much you would save? I really get the feeling that you
are trying to optimize things that are just not worth it when you
should try to re-architecture the UI to be simpler. Or that you should
at least try to understand what exactly is causing your numerous
redraws.

-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to