Improve response time of Q# standard library tests in VS code #438
Description
Describe the enhancement request
After opening tests for Q# standard library it takes around 18-20 seconds before one can go to symbol list defined in the file.
Standard library test project has 3073 lines of Q# code in 34 files.
Once Q# language server has processed the files, errors start to show up in many files, however the project builds successfully.
It looks like the definitions from the referenced standard library projects are not picked up by the language server.
To Reproduce
git clone https://github.com/microsoft/QuantumLibraries.git
cd .\QuantumLibraries\Standard\tests\
dotnet build
code .
Expected behavior
No errors show up for projects that build successfully.
It probably should take less than 18 seconds to load project with 34 files and 3073 lines.
It would be nice if the performance was comparable to other Microsoft products like TypeScript and C#, C++ compilers.
Ideally, it would be faster because syntax and type system of Q# are simpler.
System information
- OS: Windows
- .NET Core Version: 3.1.201
- Build is run on a dedicated SSD Samsung SSD 960 EVO 500 GB, separate from the SSD on which Windows is installed
- CPU: Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz set to full performance
- 32 GB RAM
Additional context
Measuring number of lines excluding blank lines and comments
To count the number of lines we used cloc with the following language definition file:
Q#
filter rm_comments_in_strings " //
filter call_regexp_common C++
3rd_gen_scale 1.36
extension qs
end_of_line_continuation \\$
cloc
can be installed on windows with choco install cloc
.
See video showing the issue.
Notice that VS code does not take full advantage of available memory and processor.