我们的应用程序在重新启动(冷启动)后启动所花费的时间要比已经打开一次(热启动)的时间多得多。
大多数(如果不是全部的话)差异似乎来自于加载DLL,当DLL在缓存内存页中时,加载速度要快得多。我们尝试使用ClearMem模拟重新启动(因为它比实际重新启动花费的时间要少得多),结果喜忧参半,在一些机器上,它似乎非常一致地模拟重新启动,而在某些机器上则不然。
综上所述,我的问题是:
- Have you experienced differences in launch time between cold and warm starts?
- How have you delt with such differences?
- Do you know of a way to dependably simulate a reboot?
编辑:
征求意见的澄清:
- The application is mostly native C++ with some .NET (the first .NET assembly that s loaded pays for the CLR).
- We re looking to improve load time, obviously we did our share of profiling and improved the hotspots in our code.
我忘了提的是,我们通过重新构建所有二进制文件得到了一些改进,这样加载程序就不必在加载时执行。