On Aug 7, 2012, at 4:13 PM, HSSoftware <da...@headstandsoftware.com> wrote: > Our app, Art Authority, was just re-built with MfA 4.0.6, Android 2.3 API, > and deployed onto both a Samsung Galaxy S 3 (Android 4.0.x) and a Google > Nexus 7 (Android 4.1.1). On both devices the app seems to run slower than on > the lowly original Kindle Fire (Android 2.3).
How much slower? Android changed how grefs are handled in Android v4.0. Prior to 4.0, a gref is a direct pointer to the Java object. Managed wrapper instance lookup is thus equivalent to: IJavaObject wrapper = instances [gref]; With 4.0, they're not. In order to make this work, when running on Android v4.0+ there are extra calls to java.lang.System.identityHashCode(): IJavaObject wrapper = instances [java.lang.System.identityHashCode (gref))]; There is thus an extra JNI call when looking up every wrapper instance. Depending on how many object lookups are occurring, this could plausibly be noticeable. > Could this be something to do with building with Android 2.3 API specified, > or the fact that SQLite moved from native to Java with Ice Cream Sandwich? SQLite didn't move from native to Java in Ice Cream Sandwich; Android still has libsqlite.so, and thus still has the native library. > We are using Android.Database.Sqlite to access SQLite. Could this pose a > performance problem? It could, if you call into it a lot. (Anything could be a performance problem if you cross the Mono/Dalvik border a lot; see also [0].) - Jon [0] http://lists.ximian.com/pipermail/monodroid/2012-July/011358.html _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid