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
This is another (different) attempt at improving performance which follows an earlier abandoned attempt captured in #989 - Using ModTime would not be reliable and also we would have no way of capturing ModTime for the virtual documents anyway! 😅
As part of #1006 we are removing de-duplication of jobs upon enqueuing and instead starting to rely on internal state. This is good strategy for the walker, which can check the internal state (i.e. avoid running if the job has already run at least once), but not so much for textDocument/didOpen.
In an ideal case the client would tell the server as part of LSP whether the document being sent in textDocument/didOpen differs from what's on disk. Unfortunately this is not possible today. The request does contain document version, but that's always 1 (at least from testing with VS Code) regardless of whether I open document w/ unsaved changes or not.
Therefore the work of figuring out the difference is left on the server.
TODO: add logic to calculate hash (sha256) for any file & compare hashes of newly received document content as part of ParseVariables and ParseModuleConfiguration - then return StateNotChangedErr early. Check for that error in downstream jobs and avoid running those downstream jobs if upstream returned that error.
The text was updated successfully, but these errors were encountered:
Background
This is another (different) attempt at improving performance which follows an earlier abandoned attempt captured in #989 - Using
ModTime
would not be reliable and also we would have no way of capturingModTime
for the virtual documents anyway! 😅As part of #1006 we are removing de-duplication of jobs upon enqueuing and instead starting to rely on internal state. This is good strategy for the walker, which can check the internal state (i.e. avoid running if the job has already run at least once), but not so much for
textDocument/didOpen
.In an ideal case the client would tell the server as part of LSP whether the document being sent in
textDocument/didOpen
differs from what's on disk. Unfortunately this is not possible today. The request does contain document version, but that's always1
(at least from testing with VS Code) regardless of whether I open document w/ unsaved changes or not.Therefore the work of figuring out the difference is left on the server.
See also:
Proposal
TODO: add logic to calculate hash (sha256) for any file & compare hashes of newly received document content as part of
ParseVariables
andParseModuleConfiguration
- then returnStateNotChangedErr
early. Check for that error in downstream jobs and avoid running those downstream jobs if upstream returned that error.The text was updated successfully, but these errors were encountered: