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

Pull diagonostics #49

Open
Alizter opened this issue Oct 7, 2022 · 5 comments
Open

Pull diagonostics #49

Alizter opened this issue Oct 7, 2022 · 5 comments
Milestone

Comments

@Alizter
Copy link
Collaborator

Alizter commented Oct 7, 2022

Diagnostics should be pulled on demand rather than all given at once.

Unlikely to solve general performance issues around them however.

Problems with current setup:

  • VsCode limits to around 1000 diagnostics
  • Our algorithm can become cuadratic if we enable the ok_diagnostics
  • Diagnostics are not a good way to convey checking progress
@ejgallego
Copy link
Owner

What are the general performance issues?

@Alizter
Copy link
Collaborator Author

Alizter commented Oct 7, 2022

Having lots of diagnostics around is generally quite slow for vscode. You are the original author of the performance issues comment however here. :-)

@ejgallego
Copy link
Owner

I was asking because there are a few different concerns w.r.t. performance.

Pull diagnostics solve quite a few other general performance issues related to diagnostics, and I think indeed it does help vscode too.

@corwin-of-amber , @Alizter , actually it is a pity that https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_diagnostic doesn't include a document point in the request, that would actually be almost enough as to have an idea of what the viewport is, and only check that part of the document.

Maybe we should open an issue upstream?

I've commented on microsoft/language-server-protocol#737

@ejgallego ejgallego added this to the 0.2.0 milestone Nov 16, 2022
@ejgallego
Copy link
Owner

To give an idea of what eager_diagnostics=true is costing us, even after #104 here are timing for Pff with and without:

[end check]: document fully checked File "file:///home/egallego/research/coq-lsp/examples/Pff.v", line 27790, characters 0-1
[cache]: hashing: 0.369962 | parsing: 2.169005 | exec: 74.997016
[cache]: cache hit rate: 0.00

[end check]: document fully checked File "file:///home/egallego/research/coq-lsp/examples/Pff.v", line 27790, characters 0-1
[cache]: hashing: 0.243913 | parsing: 1.468305 | exec: 64.425011
[cache]: cache hit rate: 0.00

take them with a grain of salt, as all informal timings, but that seems significative.

@ejgallego
Copy link
Owner

I was trying to understand how partial Pull Diagnostics work, but I couldn't really figure out from the spec :/

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

No branches or pull requests

2 participants