ASP.NET:Ro​​slyn的页面更改速度很慢 [英] ASP.NET: Roslyn slow on page changes

查看:62
本文介绍了ASP.NET:Ro​​slyn的页面更改速度很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB.NET ASP.NET(4.6.1)MVC应用程序,该应用程序是使用新的Roslyn编译器构建的.

i have an VB.NET ASP.NET (4.6.1) MVC Application which is build with the new Roslyn Compilers.

每次我更改(vbhtml)文件并重新加载页面时,大约需要9秒钟才能重新加载页面.此时,正在运行vbc.exe和VBCSCompiler.exe:

Everytime i change a (vbhtml) File and reload the page it takes approx 9 seconds to reload the page. In this time a vbc.exe and a VBCSCompiler.exe are running:

我找不到任何有关此性能下降的提示(使用ANTS配置文件),并且我的系统应足够快以更快地处理请求(Windows 10 x64,i7-2600、16GB RAM,所有文件的Samsung SSD)

I couldn't find any hints for this slow performance (using ANTS Profile) and my System should be fast enough to handle the Requests much quicker (Windows 10 x64, i7-2600, 16GB RAM, Samsung SSD for all files).

我还尝试了新的Roslyn Build,但没有任何变化:

i also tried the new Roslyn Builds, but nothing changed:

<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform"version="1.0.1" targetFramework="net452" />

任何想法,我怎样才能获得更好的装弹时间?

Any Ideas, how i can get better reload times?

UPDATE1::在删除软件包Microsoft.CodeDom.Providers.DotNetCompilerPlatform时,我的页面重新加载时间降至< 500ms!

UPDATE1: When removing the package Microsoft.CodeDom.Providers.DotNetCompilerPlatform my page reload time goes down to <500ms!

推荐答案

新编译器需要几秒钟的启动时间,因为它需要JIT许多IL程序集.Ngen'ing编译器及其依赖程序集将有助于减少启动时间.您可以做的就是找到编译器程序集并执行

The new compiler takes several seconds to start since it needs to JIT many IL assemblies. Ngen'ing the compiler and its dependency assemblies would help reduce the starting time. What you can do is to find the compiler assembly and do

ngen.exe install VBCSCompiler.exe
ngen.exe install csc.exe
ngen.exe install vbc.exe

您需要从提升的控制台中运行以上命令.如果您的计算机是64位的,则可能需要使用64位的ngen.exe.通常,64位ngen.exe位于C:\ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319中.

You would need to run the above commands from an elevated console. And you may need to use the 64-bit ngen.exe if your machine is 64-bit. Normally the 64-bit ngen.exe locates in C:\Windows\Microsoft.NET\Framework64\v4.0.30319.

这篇关于ASP.NET:Ro​​slyn的页面更改速度很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆