Comments (3)
The pull diagnostics method as an unchanged property to signal that issue for a document have not changed. Incremental updating does not exist right now.
from language-server-protocol.
@keyboardDrummer Can you give us a more detailed overview what you think is a "large file" and awhat a lot of diagnostics would be?
Because in my experience the reason why things get slower is not the fact that a 100-1000 diagnostics are sent from the server to the client, but the fact that the server is busy parsing and doing type inference (which is probably 100 times more time intensive than sending the data).
from language-server-protocol.
Consumers of our VSCode extension (for Dafny) have files that are thousands of lines, and information diagnostics are likely to occur on every line. An information diagnostic per line may seem like a lot, but our language has a relatively high level of implicitness/inference (unrelated to types), so it can help to tell the user what the compiler has inferred from their code.
Sending a 1000 diagnostics for a single file might be OK, but we have the additional situation that we may send many publishDocument notifications for a single document change.
The reason for this is that our back-end has one fast phase (parsing/name resolution/type inference) that takes about a 100ms, but then does a complicated analysis (called verification) on separate program elements, of which a large file may have hundreds, that each can take between 100 and 1000 ms. Automatically running verification is in some ways very similar to automatically running unit tests. We publish diagnostics after the fast phase, but also each time verification of any element completes, so we may send a 100 publishDocument
notifications.
What I'm worried about is sending 1000 (#lines * diagnostics/line) * 100 (amount of publishDocument calls)
of elements per document change. I'll admit we are not evidently running into this at the moment, but it seems like our current design won't scale towards ever growing customers codebases.
I will say though we've extended LSP with a notification API to notify the client about the current progress of verification, so for each verifiable element to say whether it's: not being run/queued/running/completed. We could send additional diagnostics through this API, and use publishDocument only for the fast phase parsing/name resolution/type inference) diagnostics.
from language-server-protocol.
Related Issues (20)
- MetaModel.json use during LSP implementation HOT 12
- Specify exactly what "the client will normalize line ending characters" means HOT 2
- Clarify docs: deltaLine and deltaStart fields of semantic tokens relate to the _start_ of the previous token HOT 2
- MetaModel: Missing Types and `TraceValue` vs `TraceValues` HOT 2
- What's the difference about deprecated in Diagnostic and Semantic Token? HOT 2
- Range property in TextDocumentContentChangeEvent inconsistent with comment HOT 1
- Can a client use `window/workDoneProgress/cancel` to cancel a progress token provided by the client? HOT 8
- Add 'linewidth' parameter to 'formatting_options' HOT 1
- Define/document the ways in which clients may/may not change custom-scheme URIs provided by the server
- Unclear handling of nil diagnostic responses
- When are params and error data optional?
- Command line utility for lsp client HOT 1
- Support multiple output channels for log message notifications
- Better document HOT 4
- Server capability for configuration change notifications? HOT 12
- Detailed explain on semantic token types?
- Recommend relationship between error ranges and selections for quickfixes HOT 1
- Clarification on integers and enums HOT 1
- Add "generated" to `SymbolTag`
- Define POSIX (POSIX.1-2017) as a standard regular expression variant HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-server-protocol.