Does it help to use NGEN?

后端 未结 6 1827
离开以前
离开以前 2020-11-30 07:50

Is it better to use NGEN an ASP.NET application when we know it is not going to change much? Or is the JIT good enough?

The only reason I asked was because this arti

6条回答
  •  鱼传尺愫
    2020-11-30 08:23

    NGen will only help startup time - it doesn't make the code execute any faster than it would after JITting. Indeed, I believe there are some optimizations which NGen doesn't do but the JIT does.

    So, the main question is: do you have an issue with startup time? I don't know how much of an ASP.NET application's start-up time will be JITting vs other costs, btw... you should probably look at the Performance Manager graphs for the JIT to tell you how much time it's really costing you.

    (In terms of availability, having multiple servers so you can do rolling restarts is going to give you much more benefit than a single server with an NGENed web app.)

提交回复
热议问题