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
{{ message }}
Repository navigation
Is there any way to speed up the "auto closing brackets comments" updates? #2011
We have a half-second delay when we get updates to the data that renders these, because if you're typing quickly we might get an update that corresponds to an older version of the document - and if we render that, all of the offsets would be incorrect and they'd render in the wrong locations.
It's possible we might be able to improve this, for example:
Doing some basic checking on the offsets to see if they correspond to locations that look sensible (eg. parens)
If we move to the LSP implementation, we might be able to attach document versions to the data, so we could immediately use or discard the results
2 is long-term, but maybe 1 is more feasible in the sort term. I'll see if I can have a little play with this when time allows.
I've removed the 500ms delay when processing the labels now, but instead check that each one matches up with a ) or ] in the document before updating. This should make them update much quicker (and remaining delay is in the round trip to the server, but has been tiny in my testing).
(FWIW if it wasn't clear, the version linked above has now been released, so you don't need to install the preview, you can just get 3.6 from the marketplace).
Activity
DanTup commentedon Sep 30, 2019
We have a half-second delay when we get updates to the data that renders these, because if you're typing quickly we might get an update that corresponds to an older version of the document - and if we render that, all of the offsets would be incorrect and they'd render in the wrong locations.
It's possible we might be able to improve this, for example:
2 is long-term, but maybe 1 is more feasible in the sort term. I'll see if I can have a little play with this when time allows.
DanTup commentedon Oct 9, 2019
I've removed the 500ms delay when processing the labels now, but instead check that each one matches up with a
)or]in the document before updating. This should make them update much quicker (and remaining delay is in the round trip to the server, but has been tiny in my testing).If you want to try it out, there's a build here:
https://github.com/Dart-Code/Dart-Code/releases/tag/v3.6.0-alpha.2
More info on installing from vsix is here: https://dartcode.org/docs/installing-a-preview-release/
Please let me know how it feels.
irahulcse commentedon Nov 6, 2019
Thanks, @DanTup. This update was really helpful.
DanTup commentedon Nov 6, 2019
Great, glad to hear it's better! 👍
(FWIW if it wasn't clear, the version linked above has now been released, so you don't need to install the preview, you can just get 3.6 from the marketplace).