-
Notifications
You must be signed in to change notification settings - Fork 91
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
Wait a bit after change before sending diagnostics #1202
Conversation
b2f159b
to
02e3748
Compare
@vrubezhny could you review too this PR and tell me if it improves performance for Eclipse IDE with WWD please. |
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/commons/ModelValidatorDelayer.java
Show resolved
Hide resolved
02e3748
to
97d3a2e
Compare
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/commons/ModelValidatorDelayer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The delay is working as described, however, perhaps we can optimize diagnostic reporting further by only sending the affected diagnostic in the response (i.e. if there are 2 diagnostics in 2 separate files in the workspace, and one diagnostic is changed, the other still sends a publishDiagnostics
response)
When you say affected diagnostic you mean the document which is updating? If it that the report of the diagnostic is just for the updated document. But if you save the document in this case the server will report diagnostics for all opened document. Perhaps it is tour usecase |
Yes, I update the diagnostic by saving, so all diagnostics are reported again. |
97d3a2e
to
427fdf6
Compare
Fixes eclipse#1162 Signed-off-by: azerr <[email protected]>
It is the expected behvior. This PR provides delay for reporting diagnostic when document changed. When document it is saved, there is no delay and I think it is not annoying to report diagnostics for all opened files just on save. The problem is when you change document, you must try to report few diagnotics to improve :
|
Thanks @fbricon @AlexXuChen for your review! |
Wait a bit after change before sending diagnostics
Fixes #1162
Signed-off-by: azerr [email protected]