Preload dll's for Xamarin.Android

Hi everyone,

I'm developing a application for android. But when starting a second activity, the navigation is slow.
This is because some dll's are still to import upon the navigation.

As you can see here in the logs, it is doing to much work. (up to 900ms)

    06-29 11:54:39.908 D/Mono    (20586): Assembly Ref addref TestProj[0xb4adb2e0] -> Newtonsoft.Json[0xb4adb280]: 2
    06-29 11:54:39.908 D/Mono    (20586): The request to load the retargetable assembly mscorlib v2.0.5.0 was remapped to mscorlib v2.0.5.0
    06-29 11:54:39.908 D/Mono    (20586): Assembly Ref addref Newtonsoft.Json[0xb4adb280] -> mscorlib[0xb4adb1c0]: 10
    06-29 11:54:39.927 D/Mono    (20586): Remapped public key token of retargetable assembly System from 7cec85d7bea7798e to b77a5c561934e089
    06-29 11:54:39.927 D/Mono    (20586): The request to load the retargetable assembly System v2.0.5.0 was remapped to System v2.0.5.0
    06-29 11:54:39.928 D/Mono    (20586): Image addref System[0x9e7ff160] -> System.dll[0x9e43a000]: 1
    06-29 11:54:39.928 D/Mono    (20586): Assembly System[0x9e7ff160] added to domain RootDomain, ref_count=1
    Loaded assembly: System.dll [External]
    06-29 11:54:39.928 D/Mono    (20586): AOT module 'System.dll.so' not found: dlopen failed: library "/data/app/TestProj.TestProj-1/lib/arm/libaot-System.dll.so" not found
    06-29 11:54:39.929 D/Mono    (20586): AOT module '/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/builds/install/mono-armv7/lib/mono/aot-cache/arm/System.dll.so' not found: dlopen failed: library "/data/app/TestProj.TestProj-1/lib/arm/libaot-System.dll.so" not found
    06-29 11:54:39.929 D/Mono    (20586): Assembly Ref addref Newtonsoft.Json[0xb4adb280] -> System[0x9e7ff160]: 2
    06-29 11:54:39.930 D/Mono    (20586): Assembly Ref addref System[0x9e7ff160] -> mscorlib[0xb4adb1c0]: 11
    06-29 11:54:39.945 D/Mono    (20586): Remapped public key token of retargetable assembly System.Core from 7cec85d7bea7798e to b77a5c561934e089
    06-29 11:54:39.945 D/Mono    (20586): The request to load the retargetable assembly System.Core v2.0.5.0 was remapped to System.Core v2.0.5.0
    06-29 11:54:39.946 D/Mono    (20586): Unloading image System.Core.dll [0x9e439c00].
    06-29 11:54:39.946 D/Mono    (20586): Image addref System.Core[0x9e7ff280] -> System.Core.dll[0x9e42f800]: 4
    06-29 11:54:39.946 D/Mono    (20586): Assembly Ref addref Newtonsoft.Json[0xb4adb280] -> System.Core[0xb4adbac0]: 3
    06-29 11:54:39.946 D/Mono    (20586): Remapped public key token of retargetable assembly System.Runtime.Serialization from 7cec85d7bea7798e to b77a5c561934e089
    06-29 11:54:39.946 D/Mono    (20586): The request to load the retargetable assembly System.Runtime.Serialization v2.0.5.0 was remapped to System.Runtime.Serialization v2.0.5.0
    06-29 11:54:39.947 D/Mono    (20586): Image addref System.Runtime.Serialization[0x9e7ff280] -> System.Runtime.Serialization.dll[0x9e439c00]: 1
    Loaded assembly: System.Runtime.Serialization.dll [External]
    06-29 11:54:39.947 D/Mono    (20586): Assembly System.Runtime.Serialization[0x9e7ff280] added to domain RootDomain, ref_count=1
    06-29 11:54:39.947 D/Mono    (20586): AOT module 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/TestProj.TestProj-1/lib/arm/libaot-System.Runtime.Serialization.dll.so" not found
    06-29 11:54:39.948 D/Mono    (20586): AOT module '/Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/builds/install/mono-armv7/lib/mono/aot-cache/arm/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/TestProj.TestProj-1/lib/arm/libaot-System.Runtime.Serialization.dll.so" not found
    06-29 11:54:39.948 D/Mono    (20586): Assembly Ref addref Newtonsoft.Json[0xb4adb280] -> System.Runtime.Serialization[0x9e7ff280]: 2
    06-29 11:54:39.948 D/Mono    (20586): Assembly Ref addref System.Runtime.Serialization[0x9e7ff280] -> mscorlib[0xb4adb1c0]: 12
    06-29 11:54:39.968 D/Mono    (20586): Assembly Ref addref System.Core[0xb4adbac0] -> System[0x9e7ff160]: 3
    Loaded assembly: Anonymously Hosted DynamicMethods Assembly [External]
    06-29 11:54:40.573 D/Mono    (20586): Assembly Ref addref OxyPlot.Xamarin.Android[0xb4adb160] -> Mono.Android[0xb4adb640]: 7
    06-29 11:54:40.573 D/Mono    (20586): Assembly Ref addref OxyPlot.Xamarin.Android[0xb4adb160] -> OxyPlot[0xb4adb220]: 2
    06-29 11:54:40.574 D/Mono    (20586): The request to load the retargetable assembly mscorlib v2.0.5.0 was remapped to mscorlib v2.0.5.0
    06-29 11:54:40.574 D/Mono    (20586): Assembly Ref addref OxyPlot[0xb4adb220] -> mscorlib[0xb4adb1c0]: 13
    06-29 11:54:40.581 D/Mono    (20586): Assembly Ref addref OxyPlot.Xamarin.Android[0xb4adb160] -> mscorlib[0xb4adb1c0]: 14
    06-29 11:54:40.596 W/art     (20586): JNI RegisterNativeMethods: attempt to register 0 native methods for md5b5002eb9a5dcae49b12a413b2227c1c3.DailyProgressDetailViewHolder
    06-29 11:54:40.602 D/android.widget.GridLayout(20586): horizontal constraints: x1-x0>=135, x2-x1>=60, x3-x2>=1020, x4-x3>=0, x4-x0<=1020 are inconsistent; permanently removing: x4-x0<=1020. 
    06-29 11:54:40.619 D/Mono    (20586): Assembly Ref addref OxyPlot.Xamarin.Android[0xb4adb160] -> System.Core[0xb4adbac0]: 4

Is there some way to preload these dll's when the app starts. So I can cut down the navigation time?

Answers

  • CheesebaronCheesebaron DKInsider, University mod

    You could try switching on AOT and see how that effects performance.

  • Bord1986.6225Bord1986.6225 ITMember ✭✭

    Same problem here..AOT doesn't seems to works.other options?

  • GabrielPollakGabrielPollak USMember

    Did anyone find a solution to this? Got stuck with the same problem...

Sign In or Register to comment.