Performance: pre-instantiate activities on app launch? Good practice or not?

by matthias » Wed, 01 Apr 2009 15:52:21 GMT


Sponsored Links
 Thanks for your reply Dianne.

As to profiling, I looked at traceview, but seems to be a bit overly
simplistic to actually profile a whole app. What I understand from the
documentation, what it actually does is measuring the time it takes
for a single method to complete. That's not a terribly useful
information if you want to see the big picture, however (i.e. get
answers to questions such as: how much time does the app spend in
which parts of the code base?).

Are there any plans to make traceview a tad more capable? That would
be great news!

Cheers,
Matthias
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. why emylator is so slow atsystem start-up

helloI used 1.5 sdk and create avd by default use target 2 .

when i run hello android excample,it's very slow to start up.
i get  log from ddms  list follows:

06-18 08:38:23.981: ERROR/vold(538): Error opening switch name path '/
sys/class/switch/test2' (No such file or directory)
06-18 08:38:24.070: ERROR/vold(538): Error bootstrapping switch '/sys/
class/switch/test2' (m)
06-18 08:38:24.070: ERROR/vold(538): Error opening switch name path '/
sys/class/switch/test' (No such file or directory)
06-18 08:38:24.070: ERROR/vold(538): Error bootstrapping switch '/sys/
class/switch/test' (m)
06-18 08:38:24.141: ERROR/flash_image(544): can't find recovery
partition
06-18 08:42:11.721: ERROR/MemoryHeapBase(582): error opening /dev/
pmem: No such file or directory
06-18 08:42:11.751: ERROR/SurfaceFlinger(582): Couldn't open /sys/
power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
06-18 08:42:11.941: ERROR/GLLogger(582): couldn't load <libhgl.so>
library (Cannot find library)
06-18 08:42:12.721: ERROR/GLLogger(582): couldn't load <libhgl.so>
library (Cannot find library)
06-18 08:47:24.330: ERROR/BatteryService(582): Could not open '/sys/
class/power_supply/usb/online'
06-18 08:47:24.442: ERROR/BatteryService(582): Could not open '/sys/
class/power_supply/battery/batt_vol'
06-18 08:47:24.461: ERROR/BatteryService(582): Could not open '/sys/
class/power_supply/battery/batt_temp'
06-18 08:47:31.182: ERROR/EventHub(582): could not get driver version
for /dev/input/mouse0, Not a typewriter
06-18 08:47:31.221: ERROR/EventHub(582): could not get driver version
for /dev/input/mice, Not a typewriter
06-18 08:47:34.343: ERROR/System(582): Failure starting core service
06-18 08:47:34.343: ERROR/System(582): java.lang.SecurityException
06-18 08:47:34.343: ERROR/System(582):     at
android.os.BinderProxy.transact(Native Method)
06-18 08:47:34.343: ERROR/System(582):     at
android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:
146)
06-18 08:47:34.343: ERROR/System(582):     at
android.os.ServiceManager.addService(ServiceManager.java:72)
06-18 08:47:34.343: ERROR/System(582):     at
com.android.server.ServerThread.run(SystemServer.java:163)
06-18 08:47:34.482: ERROR/AndroidRuntime(582): Crash logging skipped,
no checkin service

who can tell me why ? thanks

--~--~---------~--~----~------------~-------~--~----~

2. What's the best way to wait for a view to layout.

Create a subclass and override onSizeChanged() or use a
ViewTreeObserver and its OnGlobalLayoutListener.

On Wed, Jun 17, 2009 at 2:09 PM,





-- 
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

--~--~---------~--~----~------------~-------~--~----~

3. Branding Android components like Button etc.

4. Input keyboard and ListView onItemClick

5. Removing SurfaceView when switching layouts

6. How to add a new library to android source

7. how to enable SkDEBUGF printf