I tried to search, but so far with no luck. Does anyone know a good resource how one should do cold start optimizations?
The app in question is C++/MFC app, compiled with VS2010, full version, with built in profiler available. I have tried to cut down all the extra weight to get the load times acceptable for warm start, but the cold start is simply unacceptable. Sometimes close to 30 secs, and there is nothing that’s slow code wise. Cpu loads hit 80% during warm starts, and stay below 20% during cold starts.
I tried to play with delay-load linker settings today, but I don’t quite understand how they affect the performance. Also, I tried the executable packer, but the test on VM didn’t seemed to be way faster. Is there anything else I could try?
One thing that might help is to have a look into profile guided optimisation, which reorders the executable so that things load in the most efficient order.
But really you should try and work out where the time’s going – sounds like it might be doing a lot of disk access – are you loading a lot of big data (images, etc?). It seems unlikely that it would be purely code loading which is taking so much time.
Have you tried a tool like Procmon (www.sysinternals.com) to see which files are being touched?