I guess findViewById uses some kind of map implementation with O(log
n)
So my guess is that it's about 100-200 compared to 0 when you use
member access.

On Apr 13, 6:40 pm, Alexey <avolo...@gmail.com> wrote:
> yeah, that reference doesn't have number i'm looking for.
>
> On Apr 13, 11:20 am, Michael Bollmann
>
> <michael.bollm...@googlemail.com> wrote:
> > It depends on how often you call it and what your app is doing anyway.
> > Now matter how good it's implementation is access to a member variable
> > is always much faster than a function call.
> > On the other hand you might not notice any improvement in case your
> > app does some stuff that takes
> > 1000 times longer than a call to findViewById.
>
> > Take a look at 
> > this:http://developer.android.com/guide/practices/design/performance.html#...
>
> > On Apr 13, 6:04 pm, Alexey <avolo...@gmail.com> wrote:
>
> > > Hi all, trying to find some performance numbers for findViewById -
> > > need to convince  to change bunch of the findViewById for the same
> > > widget to member variable with just one findViewById on create . Or
> > > may be i'm wrong and it's fine ?
--~--~---------~--~----~------------~-------~--~----~
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