I am exploring the use of RuntimeHelpers.PrepareMethod () to reduce startup time in thin client applications using powerful user interface libraries.
I created a JIT-helper class to run in the background thread and iterate using type or assembly methods and calls PrepareMethod on them
First of all, is there a flaw in this? (and I don't mean JIT-throughout the application, I mean only heavy libraries like Infragistics, DevExpress and classes representing window classes in WPF)
Secondly, is there a way to determine if the JIT method has already been run? (although I did not notice any delays or problems from accidentally calling it several times)
Finally, what happens if I do JIT-ing in a background thread and another thread calls the method that is currently in JIT-ed?
source share