Replies: 12 comments 3 replies
-
This is something we can look into. Had a couple of initial concerns:
Also we need to actually measure and see if that helps us here. |
Beta Was this translation helpful? Give feedback.
-
Microsoft.CodeDom.Providers.DotNetCompilerPlatform executes csc.exe and vbc.exe to compile web app code. In a hosting environment, developer has no way to ngen Roslyn related bits. Without some optimization, the code startup performance is very bad. |
Beta Was this translation helpful? Give feedback.
-
@Jinhuafei correct but the cost of csc / vbc in this scenario has been measured as inconsequential in the past. Sure it has to JIT but only a very, very small part of the compiler. In our measurements it hasn't shown up as significant. |
Beta Was this translation helpful? Give feedback.
-
Based on my unscientific testing on a 16 cores VM, the cold startup perf diff is considerably big. Test app: VS2015 website project template |
Beta Was this translation helpful? Give feedback.
-
We've seen considerably smaller numbers than that when we tested. Note: another option is to ngen the binaries. |
Beta Was this translation helpful? Give feedback.
-
Since our shipping binaries spend a very small amount of time jitting, I think we should close this issue; there's no real benefit for us to jit on multiple cores. |
Beta Was this translation helpful? Give feedback.
-
@TyOverby our shipping binaries spend a small time JIT'ing because they are NGEN on installation. This issue is concerning the non-NGEN case where JIT can be a dominating force. |
Beta Was this translation helpful? Give feedback.
-
@jaredpar In what scenarios do we ship non ngened images? |
Beta Was this translation helpful? Give feedback.
-
@TyOverby, NuGet packages (such as our toolset compilers) are probably the primary scenario. |
Beta Was this translation helpful? Give feedback.
-
@tannergooding is correct that it's NuGet distribution. In particular it's how a set of ASP.Net projects ship the compiler to the web server. This is the driving problem in this issue. |
Beta Was this translation helpful? Give feedback.
-
VBCSCompiler (the compiler server) is the primary way to avoid csc and vbc startup costs, and it works even for NuGet distribution of the toolset. I would interested to see if the same strategy could be used for #12403 (comment). |
Beta Was this translation helpful? Give feedback.
-
Are these two exe enabled with Multicore JIT? If not, can we enable it to improve the startup performance?
Beta Was this translation helpful? Give feedback.
All reactions