I have deployed a application in release mode (x64) which I expected to be fast, and I noticed that there is a severe slowdown whenever a new method, or set of methods is ex
My first solution was to manually create dummy instances of classes and then call the methods with an optional dummy bool variable which would be false by default. This worked but required adding this dummy to every method which is crude and time consuming.
Lucas Trzesniewski's answer is far more through as it prepares all classes and all methods in the code and it does not require any changes to any of my code so it is much easier to implement. The only cost is that by being so thorough it takes longer to complete at about .5 to 1.5 seconds or maybe .5 to 1 second longer than my selective start-up. More than worth it in my case to ensure no delays happen in code.
There was no noticeable spike in memory or CPU usage other than the initial start-up, and memory usage actually slightly decreased, possibly because all code is now complied and optimized.