I'm currently drawing WPF content in a Win32 window using latebinding to load the dll at runtime instead of having to reference the project and link to it during compile time. The problem I'm having is the solution that I'm currently using is very slow (almost 5 seconds just to draw the content to the screen). I've narrowed it down to essentially one line of code, Activator::CreateInstance (~4s).
I was hoping someone knew of a way to speed this process up, or have an alternative suggestion to accomplish latebinding to WPF content. I'll post my code below: