.NET 4 Web应用程序启动时间

I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.

我在与Jonathan Hawkins和ASP.NET团队的一些人聊天时谈到了性能,Jonathan提到大型ASP.NET应用程序的启动时间在.NET 4上得到了改善。CLR和ASP.NET都有一些改进。本身有帮助。 如果您拥有大型应用程序,则应进行一些测试。

The word from the ASP.NET team is that you'll see improvements when the .NET framework (CLR) is warm in memory but the Web App is cold on disk. This is for shared hosting scenarios where the web server is loading and unloading web applications while .NET remains in memory.

ASP.NET团队的话是,当.NET Framework(CLR)在内存中处于热状态但Web App在磁盘上处于冷状态时您将看到改进。 这是针对共享托管方案的,其中.NET保留在内存中,Web服务器正在加载和卸载Web应用程序。

Web App Name

NETFX3.5 SP1

NETFX4

Change

Change as % of NETFX3.5

blogengine

1.959s

1.702s

(0.256s)

-13.08%

dasblog

3.151s

2.818s

(0.333s)

-10.58%

dotnetnuke

4.026s

3.621s

(0.406s)

-10.07%

screwturnwiki

1.579s

1.500s

(0.080s)

-5.03%

Median Improvement

(0.295s)

-10.32%

Environment: NETFX v4.0, Win7-x86, 7200 RPM, 4GB, 2 Cores

网络应用名称

NETFX3.5 SP1

NETFX4

更改

更改为NETFX3.5的百分比

博客引擎

1.959年代

1.702秒

(0.256秒)

-13.08%

dasblog

3.151秒

2.818秒

(0.333秒)

-10.58%

网状网络

4.026秒

3.621秒

(0.406秒)

-10.07%

螺丝刀维基

1.579秒

1.500秒

(0.080秒)

-5.03%

中位数改善

(0.295秒)

-10.32%

环境:NETFX v4.0,Win7-x86、7200 RPM,4GB,2核

If you're interested in one of the reasons, there's a switch in C:\Windows\Microsoft.NET\Framework\v4.0.xxxx\Aspnet.config called shadowCopyVerifyByTimestamp that ASP.NET uses to startup up the CLR. The CLR optimized in .NET 4 how shadow copy assemblies are loaded by removing an unnecessary file copy if nothing's changed. Hence, part of the improvement in cold web app startup.

如果您对其中一个原因感兴趣,则C. \ Windows \ Microsoft.NET \ Framework \ v4.0.xxxx \ Aspnet.config中有一个名为shadowCopyVerifyByTimestamp的开关,ASP.NET使用它来启动CLR。 .NET 4中的CLR优化了如何通过删除不需要的文件副本(如果未进行任何更改)来加载卷影副本程序集。 因此,这是Web应用程序冷启动的部分改进。

What's the biggest ASP.NET application that you've got?

您拥有的最大的ASP.NET应用程序是什么?

翻译自: https://www.hanselman.com/blog/net-4-web-application-startup-time

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值