JIT编译器还会再来吗?

发布于 2024-08-29 21:32:08 字数 201 浏览 2 评论 0原文

我有一个疑问,我有一个 ASP.NET MVC Web 应用程序,每天晚上我们都会从 IIS 回收应用程序池。现在,当第二天收到第一个请求时,需要一些时间才能得到响应。

第一个请求需要时间,因为应用程序域未加载(应用程序未启动)来启动 Web 应用程序需要一些时间。

现在的问题是,及时编译器还会再次出现吗? 意味着每天早上都需要再次通过JIT重新编译?

I have one doubt here , I have one asp.net MVC web application and every night we are recylcing the applciation pool from IIS. Now when the next day first request comes it is taking time to get response.

First request it is taking time because app domain is not loaded (application is not started) to start web application it takes some time.

Now the question is does the just in time compiler will come here again ?
Means every morning it needs to recompiled by JIT again ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅黛梨妆こ 2024-09-05 21:32:08

是的,应用程序将在回收后再次从 IL 编译为可执行代码:丢弃 appdomain 也会丢失 JIT 后的本机映像。

例如,您可以通过将不经常更改的依赖程序集放入 GAC 中来避免某些编译,并对它们使用 NGEN。这可能会加快一些速度。

Yes, the application will be compiled from IL to executable code again after the recycle: Throwing away the appdomain will also loose the JITed native images.

You could, for instance, avoid some of the compilation by putting dependent assemblies that don't change often in the GAC, and use NGEN on them. That could possible speed up things a bit.

温柔戏命师 2024-09-05 21:32:08

JITting 通常不会对性能造成巨大影响。冷启动 IIS 进程、启动 AppDomain 并从磁盘加载程序集可能会产生更大的影响。此外,您的应用程序可能在 global.asax 文件中具有一些自定义启动逻辑(从数据库读取内容)。并且不要忘记您的数据库可能也必须唤醒。

JITting will normally not have a huge performance hit. Cold startup of the IIS process, starting your AppDomain and loading your assemblies from disk will probably have much higher impact. Also, your application might have some custom startup logic in the global.asax file (reading stuff from db). And don't forget your database might have to wake up as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文