我正在考虑迁移到 MonoDroid,问题是试用版只允许在模拟器中测试我的代码,并且在模拟器中一切运行缓慢。我的问题(在我支付 400 美元之前)是编译的代码在部署到实际设备时是否运行得足够快?
问问题
1472 次
4 回答
4
应用程序启动后(约 3 秒)的性能在 Nexus One 上非常好,与尝试在模拟器上运行完全不同。
于 2011-05-06T19:14:02.170 回答
3
设备上的性能对我也有好处。有时甚至比 Dalvik 还要快。但是,是的,开始时存在 2-3 秒的延迟。
(这个“答案”旨在向想要尝试 MonoDroid 的人保证它不仅适用于一个人 :))
于 2011-08-22T02:31:03.580 回答
1
我看到启动时的延迟远远超过 2-3 秒。也就是说,从我点击一个应用程序(并且日志显示 ActivityManager 启动我的 Activity)到OnCreate
第一次调用的时间。
我在装有 Android 2.2(大约 2 岁)的 HTC Legend 上看到 5 秒或更长时间。例如:
2011-11-26 11:54:37.782 I 97/ActivityManager: Displayed activity
com.xxx.android/.SplashActivity: 5309 ms (total 5309 ms)
或完整的日志:
2011-11-26 11:54:32.372 I 97/ActivityManager: Starting activity: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
flg=0x10200000 cmp=com.xxx.android/.SplashActivity }
2011-11-26 11:54:32.492 I 97/ActivityManager: Start proc com.xxx.android
for activity com.xxx.android/.SplashActivity: pid=23858 uid=10055
gids={1015, 3003}
2011-11-26 11:54:32.492 I 23858/pthread: ## thread 23858 is creating
thread @dalvik/vm/Thread.c:1795
2011-11-26 11:54:32.502 I 23858/pthread: ## thread 23859 is created success
2011-11-26 11:54:32.522 I 23858/pthread: ## thread 23858 is creating
thread @dalvik/vm/Thread.c:1795
2011-11-26 11:54:32.522 I 23858/pthread: ## thread 23860 is created success
2011-11-26 11:54:32.592 I 23858/pthread: ## thread 23858 is creating
thread @dalvik/vm/Thread.c:1795
2011-11-26 11:54:32.592 I 23858/pthread: ## thread 23861 is created success
2011-11-26 11:54:32.602 I 23858/pthread: ## thread 23858 is creating
thread @frameworks/base/libs/utils/Threads.cpp:139
2011-11-26 11:54:32.622 I 23858/pthread: ## thread 23862 is created success
2011-11-26 11:54:32.632 I 23858/pthread: ## thread 23862 is creating
thread @frameworks/base/libs/utils/Threads.cpp:139
2011-11-26 11:54:32.642 I 23858/pthread: ## thread 23863 is created success
2011-11-26 11:54:32.712 I 73/pthread: ## thread 23864 is created success
2011-11-26 11:54:32.712 I 73/pthread: ## thread 23865 is created success
2011-11-26 11:54:32.792 I 23858/ActivityThread: Publishing provider
com.xxx.android.__mono_init__: mono.MonoRuntimeProvider
2011-11-26 11:54:32.842 D 23858/dalvikvm: Trying to load lib
/data/data/com.xxx.android/lib/libmonodroid.so 0x44e02348
2011-11-26 11:54:32.872 D 23858/dalvikvm: Added shared lib
/data/data/com.xxx.android/lib/libmonodroid.so 0x44e02348
2011-11-26 11:54:33.332 I 23858/pthread: ## thread 23866 is created success
2011-11-26 11:54:33.552 D 183/BT HS/HF: gsmAsuToSignal=6
2011-11-26 11:54:34.042 2 97/GpsLocationProvider:
ServiceState.STATE_IN_SERVICE
2011-11-26 11:54:34.042 D 97/ConnectivityService: getMobileDataEnabled
returning true
2011-11-26 11:54:34.052 D 97/TelephonyRegistry: notifyDataConnection()
state=2isDataConnectivityPossible()true, reason=null
2011-11-26 11:54:34.052 D 97/TelephonyRegistry:
broadcastDataConnectionStateChanged()
state=CONNECTEDtypes=default,dun,supl, interfaceName=rmnet0
2011-11-26 11:54:34.072 D 97/NetworkLocationProvider:
onDataConnectionStateChanged 3
2011-11-26 11:54:34.092 D 97/ConnectivityService: getMobileDataEnabled
returning true
2011-11-26 11:54:34.122 D 97/MobileDataStateTracker: replacing old
mInterfaceName (rmnet0) with rmnet0 for hipri
2011-11-26 11:54:34.122 D 97/MobileDataStateTracker: replacing old
mInterfaceName (rmnet0) with rmnet0 for supl
2011-11-26 11:54:34.132 D 97/MobileDataStateTracker: replacing old
mInterfaceName (rmnet0) with rmnet0 for dun
2011-11-26 11:54:34.222 2 97/AlarmManager: Adding Alarm{4521c788 type 2
com.google.android.apps.maps} Dec 15 09:35:32 am
2011-11-26 11:54:34.362 I 97/LSState:
EventReceiver:android.intent.action.NOTIFICATION_UPDATE
2011-11-26 11:54:34.822 D 23858/dalvikvm: GC_FOR_MALLOC freed 11754
objects / 463408 bytes in 67ms
2011-11-26 11:54:35.042 D 23858/dalvikvm: GC_FOR_MALLOC freed 10024
objects / 469712 bytes in 62ms
2011-11-26 11:54:36.372 I 97/LSState:
EventReceiver:android.intent.action.NOTIFICATION_UPDATE
2011-11-26 11:54:37.462 I 23858/pthread: ## thread 23867 is created success
2011-11-26 11:54:37.782 I 97/ActivityManager: Displayed activity
com.xxx.android/.SplashActivity: 5309 ms (total 5309 ms)
于 2011-11-26T01:18:05.417 回答
0
缓慢是由于 Android 模拟器 - 在实际设备上运行对于 MonoDroid 来说很好。
于 2014-06-25T14:53:23.120 回答