简体   繁体   English

加快ASP.Net网站的加载时间

[英]Speeding up load times for an ASP.Net website

We have an ASP.Net Webforms site (.Net 3.5) that has about 100 references in the project, so it's not tiny. 我们有一个ASP.Net Webforms站点(.Net 3.5),在项目中有大约100个引用,所以它并不小。 Reuilding the site takes maybe 20-30 seconds but it's the load time that's a killer. 重建网站大概需要20-30秒,但这是一个杀手的加载时间。 At least 5 minutes before the first page opens in the browser on our development machines. 在我们的开发机器上的浏览器中打开第一页之前至少5分钟。 We're building in VS 2012 fwiw. 我们正在VS 2012 fwiw建设。

What can we do to speed things up? 我们可以做些什么来加快速度? There's an 'optimizeCompilation' flag you can put into web.config, and that's helped a little but not as much as we'd hoped. 你可以在web.config中添加一个'optimizeCompilation'标志,这有点帮助,但没有我们希望的那么多。 Is there a checklist we can go through to try and find the real bottlenecks in the site load time? 我们可以通过检查清单来尝试找到网站加载时间的真正瓶颈吗?

I can state that when the site is coming up the ASP.Net Temporary files folder slowly accumulates files. 我可以说当网站即将到来时,ASP.Net Temporary files文件夹会慢慢累积文件。 When all is said and done there are about 2500 files in there, ~70MB total size. 完成所有操作后,大约有2500个文件,总大小约为70MB。 It almost feels like we can hand-write the contents of that folder using Notepad faster than ASP.Net puts them in there. 几乎感觉我们可以使用记事本手动编写该文件夹的内容,而不是ASP.Net将它们放在那里。

What difference do you get if you change from Debug to Release ? 如果从Debug更改为Release,你会得到什么区别?

Also, have a look at native image generation: 另外,看看原生图像生成:

Does it help to use NGEN? 使用NGEN有帮助吗?

Lastly, 100 references seems excessive! 最后,100个引用似乎过多了! What are you doing with them? 你在跟他们做什么? Is it your own code? 这是你自己的代码吗? Can you consolidate your own code into single projects ? 你能将自己的代码整合到单个项目中吗? Do some of these references themselves reference web services or anything like that ? 这些引用本身是否参考了Web服务或类似的东西?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM