Hi,
I'm seeing an issue where the first time I press a button in my app that performs some operation (which is marked as an async method), the UI freezes for ~1 second while it program appears to be trying to load the referenced dlls. On the 2nd attempt and thereafter, the UI does not freeze. In the debug console I'm seeing what appears to be the program trying to load the referenced dlls:
[Mono] Remapped public key token of retargetable assembly System.Windows from 7cec85d7bea7798e to b03f5f7f11d50a3a
[Mono] The request to load the retargetable assembly System.Windows v2.0.5.0 was remapped to System.Windows v2.0.0.0
[Mono] Unloading image System.Windows.dll [0x7968b008].
[Mono] Image addref System.Windows[0x7968bbc0] -> System.Windows.dll[0x79b76030]: 5
[Mono] Assembly Ref addref Cirrious.MvvmCross[0x76e91250] -> System.Windows[0x79b76a20]: 4
[Mono] The request to load the assembly System v2.0.5.0 was remapped to v2.0.0.0
[Mono] Unloading image System.dll [0x797b8898].
[Mono] Image addref System[0x7968bc70] -> System.dll[0x77cbaab0]: 15
[Mono] Assembly Ref addref System.Net.Http[0x77fb6790] -> System[0x77cbb8f8]: 14
[Mono] Assembly Ref addref stocks.core[0x76ed98c8] -> System.Net.Primitives[0x770d24e0]: 2
[Mono] The request to load the assembly System v2.0.5.0 was remapped to v2.0.0.0
[Mono] Unloading image System.dll [0x797ba200].
[Mono] Image addref System[0x7968bc70] -> System.dll[0x77cbaab0]: 16
[Mono] Assembly Ref addref System.Net.Primitives[0x770d24e0] -> System[0x77cbb8f8]: 15
...
[Mono] The request to load the assembly Mono.Security v2.0.5.0 was remapped to v2.0.0.0
[Mono] Image addref Mono.Security[0x79803a68] -> Mono.Security.dll[0x798231a8]: 1
[Mono] Assembly Mono.Security[0x79803a68] added to domain RootDomain, ref_count=1
...
[Mono] Assembly Ref addref System[0x77cbb8f8] -> Mono.Security[0x79803a68]: 2
[Mono] The request to load the assembly mscorlib v2.0.5.0 was remapped to v2.0.0.0
[Mono] Unloading image mscorlib.dll [0x7995d4a0].
Loaded assembly: Mono.Security.dll [External]
...
(more dlls loaded)
...
[Choreographer] Skipped 61 frames! The application may be doing too much work on its main thread.
I think the UI is freezing because these dlls are being loaded on the UI thread. The method being called when the button is clicked is already marked as an async method. Is there some way to force these dlls to load in the background so that it does not block the UI thread?