Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

Reduce diagnosticPublishDelay default #1944

Closed
mjbvz opened this issue Mar 14, 2020 · 6 comments · Fixed by #1972
Closed

Reduce diagnosticPublishDelay default #1944

mjbvz opened this issue Mar 14, 2020 · 6 comments · Fixed by #1972

Comments

@mjbvz
Copy link

mjbvz commented Mar 14, 2020

Issue Type: Bug

Problem
python.analysis.diagnosticPublishDelay defaults to 1000 milliseconds. This feels like quite a long time in practice, especially while waiting for an error you just fixed to be clear

Proposal
Reduce the default value. Unless there's some reason this needs to be so high, a lower default provide the majority of users who will never change the default with a more responsive editing experience. Advanced users can still increase it if they want/need to

JS/TS users a default delay of around 200ms. If we get another document update before we finish computing the errors, we cancel the ongoing diagnostics request and queue up a new one

Extension version: 2020.4.68060-dev
VS Code version: Code - Insiders 1.44.0-insider (efd7548df65de8e775015b67863190e6bd4934fc, 2020-03-13T06:01:51.669Z)
OS version: Darwin x64 19.3.0

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Mar 16, 2020
@MikhailArkhipov
Copy link

You can set it to the desired value. Actually, it is set to 1 sec by user requests: people did not want to see squiggles right away and error list updating and possibly flickering on every type.

@mjbvz
Copy link
Author

mjbvz commented Mar 17, 2020

Yes I understand it is configurable. But I suspect few people are changing this and the current default makes it seem like server is slow recomputing diagnostics. Some delay while the document is changing is good but 1sec feels surprisingly long in practice

@jakebailey
Copy link
Member

Just to provide perspective, microsoft/vscode-python#2270 was the original issue. Back then, the only way to get diagnostics errors (syntax, lints) was from pylint or similar on save.

Given we've had real live syntax checking for a while, perhaps we should consider lowering this as I expect many users are more comfortable with seeing info earlier. May be useful to go see what other languages (TS, C#, etc) are doing in their LS/analysis implementations.

@MikhailArkhipov
Copy link

Perhaps 400 ms?

@jakebailey
Copy link
Member

Sure, though I also wouldn't be opposed to 200ms if that's the debounce other languages are using. I haven't had time to try and find that out for myself.

@MikhailArkhipov
Copy link

0.5.46

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

Successfully merging a pull request may close this issue.

3 participants