Following this answer Preload all assemblies (JIT)
a good way to preload all assemblies of an app. could be
Private Sub PreLoadJit()
For Each type In Assembly.GetExecutingAssembly.GetTypes
For Each method In type.GetMethods((BindingFlags.DeclaredOnly _
Or (BindingFlags.NonPublic _
Or (BindingFlags.Public _
Or (BindingFlags.Instance Or BindingFlags.Static)))))
If (((method.Attributes And MethodAttributes.Abstract) _
= MethodAttributes.Abstract) _
OrElse method.ContainsGenericParameters) Then
continue For
End If
System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(method.MethodHandle)
Next
Next
End Sub
But when launch the method? I think could be the first method in the MyBase.Load Method, but don't know if i'm right.
And following this older article
https://www.codeproject.com/Articles/31316/Pre-compile-pre-JIT-your-assembly-on-the-fly-or-tr
The author uses a thread to run the method. What about build pre-jit on starting as a method called in the mainthread, or lauch it in a separate thread?