> the 40 ms in your example contain creating a new GestureDetector
> (which you don't do when you switch within your activity), and packing
> and retrieving the start value into an intent extra.

that's exactly the point. Not only the GestureDetector, but you have
to create the whole application frame and each component entirely new
if you start a new Activity. This example is rather light-weight. I
guess that the performance difference increase the more complex the
new screen becomes.
By the way- 40ms is the minimum....it goes up to 106ms (average maybe
60 ms).

The GestureDetector is the best example. Things like this have to be
created again and again in the new Activities which cost a lot of
efficience. If you take setContentView(view), it is enough to use
single object of GestureDetector for every views. With a single
variable you can provide GestureDetector-Access to the view which is
active and lock it for all the others.

> Packing and retrieving the extra gives the application additional
> value (because your activity may communicate with 3rd party)

maximally 1-2 ms i'd give for that. This is very very light-weight
compared to the other operations. In this case it doesn't communicate
with 3rd party activity. Static long instead of long is also nearly no
difference.
That is comparable if you use an ArrayList<Integer> instead of int[ ]
in regular Java. I've tried it once, and the difference is 0ms. The
timer resolution is not enough to register that :-)

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

Reply via email to