最近,我向 VS.NET 2010 中的 ASP.NET 网站项目添加了大量新语言(作为 RESX 文件)。
该项目有大约 50 个 ASPX 页面,并且在我添加语言之前构建得相当快。
由于添加了语言,编译器需要几分钟(好吧,至少 1-2 分钟)直到浏览器看到页面。
现在我正在研究是否可以加快我的开发环境中的编译时间。我可以想到:
- 仅在部署到 Web 服务器时,保留 VS.NET 中的 RESX 文件并从另一个外部文件夹复制它们。
- 将项目类型从网站更改为 Web 应用程序。
我的问题:
您能给我一些关于如何提高 ASP.NET 4.0 中大型多语言网站的开发速度的建议吗?
Recently, I added a massive amount of new languages (as RESX files) to an ASP.NET Web Site project in VS.NET 2010.
The project has approximately 50 ASPX pages and did build rather fast, before I added the languages.
Since the languages were added the compiler takes several minutes (well, at least 1-2) until the browser sees a page.
Now I'm currently investigating, whether I could speed up compilation time inside my development environment. I can think of:
- Leaving out the RESX files in VS.NET and copy them from another, external folder, when deploying to the web server, only.
- Change the project type from Web Site to Web Application.
My question:
Can you give me some advices on how you would improve development speed of a large multi-language website in ASP.NET 4.0?
发布评论
评论(1)
将资源放入预编译程序集中。这应该会显着减少动态编译时间,这是 ASP.NET 的默认行为。
在开发环境中,只有在发生更改(显然需要重建程序集)时,它才会重新编译该程序集。
Put your resources in a precompiled assembly. This should significantly cut down your dynamic compile times, which is the default behavior for ASP.NET.
In the development environment, it would only recompile that assembly when there were changes which would obviously necessitate a rebuild of the assembly.