I
Igor Solenov
Guest
Our team is currently migrating from C# 5.0 to C# 6.0 syntax so Roslyn compiler should be used instead of the legacy one.
We have to use "csc.exe" as a part of the complex solution compilation process. Build commands look like this:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe -nologo -target:library -out:c:\repo\bin64\deb\common.dll @.\rspE0FF.tmp
This command execution takes ~400ms
"rspE0FF.tmp" content looks like this (it contains much more *.cs files, however, it does not matter, this is reproducible on any set of files):
"c:\repo\shared\common\estimation\complexjob.cs"
"c:\repo\shared\common\stringdecorator.cs"
"c:\repo\shared\common\tplextensions.cs"
"/reference:mscorlib.dll" "/reference:System.dll" "/reference:System.Data.dll" "/reference:System.Xml.dll" "/reference:System.ServiceModel.Activation.dll" "/reference:System.IdentityModel.dll" "/reference:System.Data.Entity.dll"
When Roslyn compiler is used execution time shouts to ~4100ms
c:\NewRepo\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\tools\RoslynLatest\csc.exe -nologo -target:library -out:c:\repo\bin64\deb\common.dll @.\rspE0FF.tmp
We have to build the solution by sequentially running hundreds of csc.exe commands like this. Total compilation time has grown from 2 minutes to 8 minutes.
Is this performance degradation expected?
Any advice on how to tweak this?
Continue reading...
We have to use "csc.exe" as a part of the complex solution compilation process. Build commands look like this:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe -nologo -target:library -out:c:\repo\bin64\deb\common.dll @.\rspE0FF.tmp
This command execution takes ~400ms
"rspE0FF.tmp" content looks like this (it contains much more *.cs files, however, it does not matter, this is reproducible on any set of files):
"c:\repo\shared\common\estimation\complexjob.cs"
"c:\repo\shared\common\stringdecorator.cs"
"c:\repo\shared\common\tplextensions.cs"
"/reference:mscorlib.dll" "/reference:System.dll" "/reference:System.Data.dll" "/reference:System.Xml.dll" "/reference:System.ServiceModel.Activation.dll" "/reference:System.IdentityModel.dll" "/reference:System.Data.Entity.dll"
When Roslyn compiler is used execution time shouts to ~4100ms
c:\NewRepo\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\tools\RoslynLatest\csc.exe -nologo -target:library -out:c:\repo\bin64\deb\common.dll @.\rspE0FF.tmp
We have to build the solution by sequentially running hundreds of csc.exe commands like this. Total compilation time has grown from 2 minutes to 8 minutes.
Is this performance degradation expected?
Any advice on how to tweak this?
Continue reading...