我正在开发一款休闲游戏。在我的应用程序还活着并且可以玩之前等待我很无聊,所以我试图减少所有浪费的时间:我使用了通过 OnCreate 中的线程启动的启动画面;我使用 AsyncTask 进行一些初始化。但是,阅读 logcat,我看到在 OnCreate 启动的第一条指令(即对启动画面线程的调用)之前,我在 I-dont-know-why.... 中浪费了将近 6 秒。
04-25 20:06:42.043: DEBUG/AndroidRuntime(691): CheckJNI is OFF
04-25 20:06:42.053: INFO/ActivityManager(164): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=701 uid=10025 gids={}
04-25 20:06:42.303: INFO/ActivityManager(164): Process com.android.voicedialer (pid 674) has died.
04-25 20:06:42.563: INFO/ActivityThread(701): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider
04-25 20:06:42.673: INFO/ActivityManager(164): Start proc com.android.voicedialer for broadcast com.android.voicedialer/.VoiceDialerReceiver: pid=707 uid=10035 gids={3002}
04-25 20:06:43.073: DEBUG/AndroidRuntime(691): --- registering native functions ---
04-25 20:06:43.173: DEBUG/VoiceDialerReceiver(707): onReceive Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.zapmobilegames.herculaneum flg=0x10000000 cmp=com.android.voicedialer/.VoiceDialerReceiver (has extras) }
04-25 20:06:43.213: VERBOSE/RecognizerEngine(707): deleteCachedGrammarFiles /data/data/com.android.voicedialer/files/openentries.txt
04-25 20:06:43.213: DEBUG/dalvikvm(681): GC_FOR_MALLOC freed 1689 objects / 111200 bytes in 961ms
04-25 20:06:43.303: DEBUG/vending(681): [8] LocalAssetCache.buildCache(): No package info for INSTALLED asset -1596932520012319916 (it.vanini.ottavio.android.utility.bt)
04-25 20:06:43.363: DEBUG/vending(681): [9] LocalAssetDatabase.syncWithPackageManager(): 2 assets for package "com.zapmobilegames.herculaneum": [Ljava.lang.String;@43cb5370
04-25 20:06:43.533: DEBUG/vending(681): [9] LocalAssetDatabase.notifyListener(): -5299042386818461764 / UNINSTALLED
04-25 20:06:43.753: DEBUG/vending(681): [9] LocalAssetDatabase.notifyListener(): -3430589060789413441 / UNINSTALLED
04-25 20:06:43.763: INFO/ActivityManager(164): Process com.pwnwithyourphone.voicecallerid (pid 695) has died.
04-25 20:06:43.823: INFO/ActivityManager(164): Start proc com.google.android.apps.maps:FriendService for broadcast com.google.android.apps.maps/com.google.googlenav.friend.android.ServiceReceiver: pid=718 uid=10042 gids={3003, 1015}
04-25 20:06:44.733: INFO/ActivityManager(164): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.zapmobilegames.herculaneum/.Herculaneum }
04-25 20:06:44.873: DEBUG/AndroidRuntime(691): Shutting down VM
04-25 20:06:44.873: DEBUG/dalvikvm(691): Debugger has detached; object registry had 1 entries
04-25 20:06:44.883: INFO/AndroidRuntime(691): NOTE: attach of thread 'Binder Thread #3' failed
04-25 20:06:44.933: WARN/dalvikvm(691): LinearAlloc 0x0 not freed: 0x410db3a0 len=212
04-25 20:06:44.973: WARN/dalvikvm(691): LinearAlloc 0x0 not freed: 0x410db478 len=572
04-25 20:06:45.023: INFO/ActivityManager(164): Start proc com.zapmobilegames.herculaneum for activity com.zapmobilegames.herculaneum/.Herculaneum: pid=727 uid=10066 gids={3003, 1015}
04-25 20:06:45.153: INFO/ActivityManager(164): Start proc com.google.android.googlequicksearchbox for broadcast com.google.android.googlequicksearchbox/.CorporaUpdateReceiver: pid=732 uid=10038 gids={3003}
04-25 20:06:45.503: INFO/WindowManager(164): Setting rotation to 1, animFlags=1
04-25 20:06:45.583: INFO/ActivityManager(164): Config changed: { scale=1.0 imsi=222/99 loc=it_IT touch=3 keys=1/1/2 nav=3/1 orien=2 layout=18 uiMode=17 seq=4}
04-25 20:06:45.763: INFO/ActivityThread(732): Publishing provider com.google.android.googlequicksearchbox.shortcuts: com.google.android.googlequicksearchbox.ShortcutsProvider
04-25 20:06:45.803: INFO/ActivityManager(164): Process com.android.voicedialer (pid 707) has died.
04-25 20:06:45.863: INFO/ActivityThread(732): Publishing provider com.google.android.googlequicksearchbox.google: com.google.android.googlequicksearchbox.google.GoogleSuggestionProvider
04-25 20:06:46.043: DEBUG/vending(681): [10] LocalAssetDatabase.syncWithPackageManager(): 2 assets for package "com.zapmobilegames.herculaneum": [Ljava.lang.String;@43d0e508
04-25 20:06:46.323: INFO/ActivityThread(727): Publishing provider com.example.AdContentProvider: com.greystripe.android.sdk.AdContentProvider
04-25 20:06:47.213: DEBUG/vending(681): [10] LocalAssetDatabase.notifyListener(): -5299042386818461764 / INSTALLED
04-25 20:06:47.703: DEBUG/vending(681): [10] LocalAssetDatabase.notifyListener(): -3430589060789413441 / INSTALLED
04-25 20:06:47.773: INFO/ActivityManager(164): Process com.google.android.apps.maps:FriendService (pid 718) has died.
还有这个:
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_Init
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 0
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 1
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 2
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 3
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 4
04-25 20:06:47.893: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 4060ba2c 128 5
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_Init
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 0
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.avc
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.avc
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 1
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.mpeg4
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.mpeg4
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 2
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.h263
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.decoder.h263
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 3
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.encoder.mpeg4
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.encoder.mpeg4
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 4
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.encoder.h263
04-25 20:06:48.093: INFO/QC_CORE(92): GetRolesOfComponent OMX.qcom.video.encoder.h263
04-25 20:06:48.093: INFO/QC_CORE(92): OMXCORE API - OMX_ComponentNameEnum 179e0 128 5
04-25 20:06:48.103: ERROR/(92): A component of name 'OMX.qcom.video.decoder.avc' already exists, ignoring this one.
04-25 20:06:48.103: ERROR/(92): A component of name 'OMX.qcom.video.decoder.mpeg4' already exists, ignoring this one.
04-25 20:06:48.103: ERROR/(92): A component of name 'OMX.qcom.video.decoder.h263' already exists, ignoring this one.
04-25 20:06:48.103: ERROR/(92): A component of name 'OMX.qcom.video.encoder.mpeg4' already exists, ignoring this one.
04-25 20:06:48.103: ERROR/(92): A component of name 'OMX.qcom.video.encoder.h263' already exists, ignoring this one.
04-25 20:06:48.763: INFO/ActivityManager(164): Process com.google.android.voicesearch (pid 656) has died.
04-25 20:06:48.833: VERBOSE/Herculaneum(727): Before splash screen
有什么线索吗?如何加快我的应用程序的启动速度?
谢谢您的回复!!!