.NET Release code very slow when running a method for the first time. How to fix it withough NGen?

后端 未结 3 1344
清歌不尽
清歌不尽 2021-01-06 16:48

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

3条回答
  •  清歌不尽
    2021-01-06 17:09

    NGen should be run on each machine at install time. Make it part of your install process. That will compile for the relevant architecture.

    If your delay is indeed due to JITting, this should solve it. Profile your application to be sure.

提交回复
热议问题