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

Feature: Option to control polling time interval (when polling for code changes) squiggly line lag #381

Closed
ADTC opened this issue Nov 28, 2017 · 7 comments

Comments

@ADTC
Copy link

ADTC commented Nov 28, 2017

I notice sometimes I'm editing Java code, the code linting lags behind. So assuming I type a line of code like so: String vscodeJava = null;, the squiggly lines indicating errors slowly go like this (you can see it happening slowly in front of your very eyes long after you typed the whole line out):

S                         // can't find type
St                        // can't find type
Str                       // can't find type
Stri                      // can't find type
Strin                     // can't find type
String                    // missing variable name
String                    // missing variable name
String v                  // missing semicolon
String vs                 // missing semicolon
String vsc                // missing semicolon
String vsco               // missing semicolon
String vscod              // missing semicolon
String vscode             // missing semicolon
String vscodeJ            // missing semicolon
String vscodeJa           // missing semicolon
String vscodeJav          // missing semicolon
String vscodeJava         // missing semicolon
String vscodeJava         // missing semicolon
String vscodeJava =       // missing value
String vscodeJava =       // missing value
String vscodeJava = n     // can't find symbol
String vscodeJava = nu    // can't find symbol
String vscodeJava = nul   // can't find symbol
String vscodeJava = null  // missing semicolon
String vscodeJava = null; // OK

Or see this GIF:

vscode-lagging-2
(Thank you to NickeManarin/ScreenToGif)

While this could be a bug, I think a feature to control the polling interval would be helpful. So it only polls the code for changes every second or two seconds or so.

@fbricon
Copy link
Collaborator

fbricon commented Nov 28, 2017

Recent changes improved the autocompletion performance.

Please download the most recent java-<version>.vsix file from http://download.jboss.org/jbosstools/jdt.ls/staging/ and install it by following the instructions here.

If it still isn't fast enough, you can change your vscode prefs like:

"editor.quickSuggestionsDelay": 500 // or some higher value

@ADTC
Copy link
Author

ADTC commented Nov 28, 2017

I think there is a misunderstanding here. I'm not really talking about quick suggestions popup, but rather about the squiggly lines that indicate a warning or error.

Are you able to see the GIF animation? See how the squiggly lines lag behind what I'm typing in (please ignore the popups). In fact, closely watching the animation you can see that the quick suggestions popup are right on time, but the squiggly lines are lagging behind anyway. So I believe the two are not related.

@fbricon Thank you for the quick response btw :)

@ADTC
Copy link
Author

ADTC commented Nov 28, 2017

@fbricon Btw, I see these errors in Console (under Language Support for Java). Would they be related to this problem in any way?

View the Gist of errors

@fbricon
Copy link
Collaborator

fbricon commented Nov 28, 2017

@snjeza ^^?

@ADTC have you tried the CI build? I expect the squiggly-related performance to be improved as part of the autocompletion changes

@snjeza
Copy link
Contributor

snjeza commented Nov 28, 2017

View the Gist of errors

These errors are related to eclipse-jdtls/eclipse.jdt.ls#369

@ADTC
Copy link
Author

ADTC commented Nov 28, 2017

@fbricon I'm trying the latest build 0.15.0-673. There is a definite improvement in the squiggly line performance and I'm very happy about it. 😄

It looks like instead of lagging behind (as it did in 0.14.0), now it just appears after a delay of about a second. In 0.14.0 you could especially observe the lag when you hold down Ctrl-Z to undo what you typed out (you had to wait several seconds before the language server catches up to your quick multiple undo), but with this CI build, no lag at all (except for that 1 second delay). 🙂

I will continue observing the performance during my daily work.

@fbricon
Copy link
Collaborator

fbricon commented Nov 28, 2017

Ok, let's close this one as fixed then.

@fbricon fbricon closed this as completed Nov 28, 2017
@fbricon fbricon added this to the End November 2017 milestone Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants