As Dianne mentioned, its more appropriate to profile regular boot time, and not the factory reset boot, the very very first boot of a phone, which's a special for many modules..
On Tue, May 11, 2010 at 4:01 AM, Dianne Hackborn <[email protected]>wrote: > There is no trivial way to reduce either of those. The zygote class > preloading is essential for good performance of the system after boot. The > package scan can in theory do some caching of its results after first boot, > but this is a lot of work and has the potential to introduce serious bugs if > the state gets out of sync (we've seen devices ship in the field with subtle > bugs in this area probably because they were trying to do such > optimizations). > > Also the numbers you quote are pretty large. For example, a myTouch > booting Android takes about 11 seconds in zygote preloading and 7.5 seconds > to scan packages. If your hardware is that significantly slower than a > myTouch, you may be trimming functionality out of the platform and perhaps > you can reduce the class preload set (although you need to be extremely > careful when doing so to not break the performance of the system) or remove > unneeded .apks. > > Fwiw, on Nexus One class hardware class preloading takes 2.5 seconds and > package scanning 2 seconds. :} > > On Mon, May 10, 2010 at 12:02 PM, Ashu <[email protected]>wrote: > >> Hi, We are working on Android boot time reduction. >> We use OMAP3430 Board as our Hardware. Android version is 1.6 Donut. >> >> We used bootchart to visualize boot pattern. From it, we found that >> following things take bulk of time. >> >> 1.Zygote process. It actually do the proloading of java classes that >> takes @23 secs for its completion. >> >> 2. Package manager service. >> In logcat output, we can see that Package manager scans 4 dirs, >> /system/app, >> /system/framework, >> /data/app, >> /data/app-private. >> >> And it takes nearly 11-12 sec to scan packages as shown below from >> logcat output. >> >> >> >> >> >> I/PackageManager( 827): Got library android.test.runner in /system/ >> framework/android.test.runner.jar >> I/PackageManager( 827): Got library com.android.im.plugin in /system/ >> framework/com.android.im.plugin.jar >> W/PackageManager( 827): Running ENG build: no pre-dexopt! >> D/dalvikvm( 827): GC freed 6111 objects / 272568 bytes in 72ms >> D/PackageManager( 827): Scanning app dir /system/framework >> V/PackageParser( 827): android:backupAgent = >> com.android.internal.backup.SystemBackupAgent from android >> +com.android.internal.backup.SystemBackupAgent >> D/PackageManager( 827): Scanning app dir /system/app >> V/PackageParser( 827): android:backupAgent = >> com.android.providers.settings.SettingsBackupAgent from >> com.android.providers.settings+SettingsBackupAgent >> D/dalvikvm( 827): GC freed 3717 objects / 212000 bytes in 67ms >> V/PackageParser( 827): android:backupAgent = >> com.android.inputmethod.latin.LatinIMEBackupAgent from >> com.android.inputmethod.latin+LatinIMEBackupAgent >> E/PackageManager( 827): Package com.svox.pico has mismatched uid: >> 10014 on disk, 10015 in settings; read messages: >> E/PackageManager( 827): Read completed successfully: 35 packages, 5 >> shared uids >> E/PackageManager( 827): Package android.tts has mismatched uid: 10015 >> on disk, 10016 in settings >> I/PackageManager( 827): /system/app/SubscribedFeedsProvider.apk >> changed; collecting certs >> E/PackageManager( 827): Package com.android.providers.subscribedfeeds >> requires unavailable shared library com.google.android.gtalkservice; >> ignoring! >> W/PackageParser( 827): Intent filter for activity >> ActivityIntentInfo{439d7c88 com.android.camera.ReviewImage} defines no >> actions >> D/PackageManager( 827): Scanning app dir /data/app >> D/dalvikvm( 827): GC freed 5647 objects / 350752 bytes in 73ms >> I/PackageParser( 827): Impliciting adding >> android.permission.WRITE_EXTERNAL_STORAGE to old pkg >> com.avaw.luklukpro >> I/PackageParser( 827): Impliciting adding >> android.permission.WRITE_EXTERNAL_STORAGE to old pkg org.iii.ro.iiivpa >> I/PackageParser( 827): Impliciting adding >> android.permission.READ_PHONE_STATE to old pkg org.iii.ro.iiivpa >> E/PackageManager( 827): Package org.iii.ro.iiivpa has mismatched uid: >> 10016 on disk, 10014 in settings >> D/PackageManager( 827): Scanning app dir /data/app-private >> I/PackageManager( 827): Time to scan packages: 11.632 seconds >> >> >> My question is >> 1. How can we reduce this scan time? >> 2. Is there any other way/approach to reduce android boot time? I >> don't want to reduce android kernel boot time, it is short anyway. >> >> >> >> If this is not the right forum to ask this , please redirect me to >> correct place. >> >> Thanks in Advance. >> >> >> >> >> -- >> unsubscribe: >> [email protected]<android-porting%[email protected]> >> website: http://groups.google.com/group/android-porting >> > > > > -- > Dianne Hackborn > Android framework engineer > [email protected] > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > -- > unsubscribe: > [email protected]<android-porting%[email protected]> > website: http://groups.google.com/group/android-porting > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
