Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Roslyn takes a long time and is almost silent #1717

Open
agocke opened this issue Feb 20, 2020 · 2 comments
Open

Loading Roslyn takes a long time and is almost silent #1717

agocke opened this issue Feb 20, 2020 · 2 comments

Comments

@agocke
Copy link

agocke commented Feb 20, 2020

My daily workflow is to navigate to a project like Roslyn in the terminal, run code ., and begin to edit.

Omnisharp's project loading strategy is slow and difficult to track. First, the only way I seem to be able to figure out when Omnisharp is loaded is watching for Code Lens. Compare the before and after pictures here:

Before:
image

After:
image

The first picture is before the project is loaded, while the second is after. "Run Test | Debug Test" is the only obvious difference.

The other problem is that it takes a long time to load, even if the solution context is exactly the same. If I close VS Code and then re-open it in the exact same directory without changing any files, the time between when VS Code is open and the solution is loaded is 87 seconds. This is on a reasonably powerful i7-7700 desktop machine with 65 GB of memory. In contrast, it took 27 seconds in Visual Studio.

On the other hand, VS blocked the UI thread during this time. This is worse in some sense, but it's also feedback that indicates when semantic analysis is available.

@filipw
Copy link
Member

filipw commented Feb 20, 2020

thanks for the issue, unfortunately there isn't any reliable load progress support at the moment (from that perspective this is the same as mentioned here #1521)

VS Code extension used to indicate readiness by turning the OmniSharp icon to green at the bottom, but that color was changed to always white despite my protests and now even that indicator is lost.

We have some prototypes of improving load times by parallelizing certain things.

@lspdude
Copy link

lspdude commented Nov 24, 2021

So LSPs don't save ASTs to ('cache') files? if there are 1000 files in a project, and user opens just one, all files are re-parsed?

Hmm .. if such popular tools ( C# VS code/VS) re-parse same files every time, maybe such 'caching' isn't practical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants