perf(lsp): Only evict caches on JS side when things actually change (#23293)

Currently we evict a lot of the caches on the JS side of things on every
request, namely script versions, script file names, and compiler
settings (as of #23283, it's not quite every request but it's still
unnecessarily often).

This PR reports changes to the JS side, so that it can evict exactly the
caches that it needs too. We might want to do some batching in the
future so as not to do 1 request per change.
This commit is contained in:
Nathan Whitaker 2024-04-10 18:06:37 -07:00 committed by GitHub
parent 9304126be5
commit 736f73b008
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 145 additions and 31 deletions

View file

@ -514,6 +514,7 @@ impl DiagnosticsServer {
"Error generating TypeScript diagnostics: {}",
err
);
token.cancel();
}
})
.unwrap_or_default();