Is CLR loaded and initialized everytime,when a new managed application is loaded?

后端 未结 2 1838
悲&欢浪女
悲&欢浪女 2020-12-11 05:18

Is CLR loaded and initialized everytime, when a new managed application is loaded and there is a managed application already present?

e.g. If on my machine, applicat

相关标签:
2条回答
  • 2020-12-11 05:30

    CLR is not fully loaded every time. The article linked below mentions a "hot startup" scenario, when the CLR is ready. You may have noticed this yourself when you start a .NET app for the very first time after system startup.

    In the warm startup scenario (for instance, you have already run a managed application once), it is likely that most of the pages for the main common language runtime (CLR) components are already loaded in memory from where the OS can reuse them, saving expensive disk access time. This is why a managed application is much faster to start up the second time you run it. These soft faults dominate warm startup.

    from http://msdn.microsoft.com/en-us/magazine/cc163655.aspx

    0 讨论(0)
  • 2020-12-11 05:51

    Yes, and assemblies are JIT compiled, heaps are allocated and so forth. The Windows image loader will help a bit but in general the CLR overhead is per process.

    0 讨论(0)
提交回复
热议问题