You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the attached video below, I used Zed's vim mode to do this by typing 200ovar my_long_variable_name: Dictionary<esc>
zed-gdscript-slow.mp4
Expected behavior
The extension processes the most recent contents of the file in one full pass.
In this example, I would expect all the duplicate variables to be marked as errors at the same time, and for there to be no interruption in other language features like autocomplete.
For comparison, you can do the equivalent steps in another language. For instance, make an empty Python script and type something like 200oprint(foo)<esc> (without defining foo) -- all 200 lines are marked as errors simultaneously, and autocomplete continues to work as expected.
The extension appears to process the incoming changes character-by-character (or at least edit-by-edit), which takes a very long time in this case.
The above example is a bit convoluted to make the problem easy to see, but in practice, this occurs in any script of sufficient size, and the implication is that you have to wait for each character you type to be processed individually before completion options are presented. This forces you to wait potentially one second or more each time you want to try to autocomplete something (especially if you're a fast typist), which can be quite a hindrance to productivity.
I'm not a Rust developer or Zed extension developer, so I can't tell exactly what the extension code is doing, but I wonder if it's maybe sending the whole file as a query to language server after each edit, and the language server then has to process each query one by one?
Steps to reproduce
200ovar my_long_variable_name: Dictionary<esc>zed-gdscript-slow.mp4
Expected behavior
The extension processes the most recent contents of the file in one full pass.
In this example, I would expect all the duplicate variables to be marked as errors at the same time, and for there to be no interruption in other language features like autocomplete.
For comparison, you can do the equivalent steps in another language. For instance, make an empty Python script and type something like
200oprint(foo)<esc>(without definingfoo) -- all 200 lines are marked as errors simultaneously, and autocomplete continues to work as expected.godotengine/godot-vscode-plugin behaves this way too.
Actual behavior
The extension appears to process the incoming changes character-by-character (or at least edit-by-edit), which takes a very long time in this case.
The above example is a bit convoluted to make the problem easy to see, but in practice, this occurs in any script of sufficient size, and the implication is that you have to wait for each character you type to be processed individually before completion options are presented. This forces you to wait potentially one second or more each time you want to try to autocomplete something (especially if you're a fast typist), which can be quite a hindrance to productivity.
I'm not a Rust developer or Zed extension developer, so I can't tell exactly what the extension code is doing, but I wonder if it's maybe sending the whole file as a query to language server after each edit, and the language server then has to process each query one by one?