-
Notifications
You must be signed in to change notification settings - Fork 171
Improve build time for Q# hello world application #436
Comments
I'll take a look as part of this months bug fixing session. Eliminating the dependency on the Restore target when building should improve the user experience for small projects. |
This should be improved with the changes to the Sdk setup with the next release. |
I am still observing the reported behavior (factor 7) with 0.12.20070124:
|
@vadym-kl Would it be possible to contribute to assingmnet? |
@ShaunJW360, hopefully @bettinaheim can help answer your question. I am not working on Q# compiler. |
Hello @ShaunJW360, thank you for your interest in contributing to the Q# compiler! I am currently working on this issue. Here's a bit of background on it:
For #437, the JSON file with performance data looks like the following:
Would you be interested in working on this first step regarding #437? |
@cesarzc Thanks for the additional input. Can you clarify whether the numbers are referring to time in ms, and whether the separation by |
Yes, the numbers indicate time in ms. |
Still an issue? Package restore can take a while, but in the MSBuild log on my machine I'm seeing the actual build step for new Q# console application take a little under 3 seconds now. |
Currently I see 3.5 times slower. See the steps to reproduce below. Running function time-hello {
param( [String]$language, [String]$project )
Write-Host "****************"
Write-Host "Creating hello-world console project: 'dotnet new console -n $project -lang $language"
start-process dotnet "new console", "-n $project", "-lang $language" -Wait -WindowStyle Hidden
Set-Location "./$project"
Write-Host "Running 'dotnet restore' for $language console project"
start-process dotnet -argumentlist "restore" -Wait -WindowStyle Hidden
Write-Host "Measuring 'dotnet build --no-restore' for $language console project"
Measure-Command `
{start-process dotnet -argumentlist "build", "--no-restore" -Wait -WindowStyle Hidden} `
| Out-String -Stream `
| Select-String "TotalSeconds"
Set-Location ..
Write-Host "Deleting $language project directory"
Remove-Item -r "./$project"
Write-Host " "
}
Write-Host "****************"
Write-Host "System info:"
dotnet --info | Select-String ".NET" -Context 0,4
Write-Host "****************"
Write-Host "QDK info:"
dotnet new -u | Select-String Quantum -Context 0,4
time-hello "Q#" "qs-hello"
time-hello "C#" "cs-hello" gives me
|
Describe the enhancement request
Currently hello world sample takes around 7 times longer for Q# project to compile than for C# project.
To Reproduce
Run the following PowerShell script to reproduce:
Expected behavior
Given that Q# is transpiled into C# and Q# is much simpler programming language than C#, I would expect Q# project to take at most two times longer to build.
Actual behavior
Currently hello world sample takes around 7 times longer for Q# project to compile than for C# project, which is 14 seconds on a performant machine.
System information
Additional context
See videos showing build time with versions:
-2003
-2004.
The text was updated successfully, but these errors were encountered: