Improve performance of JSON schema creation (#6770)

JSON LSP adapter now caches the schema. `workspace_configuration` is
back to being async, and we are also no longer asking for font names
twice while constructing the schema.
Release Notes:
- Improved performance when opening the .json files.

---------

Co-authored-by: Kirill <kirill@zed.dev>
This commit is contained in:
Piotr Osiewicz 2024-01-26 19:54:45 +01:00 committed by GitHub
parent 0a124a9908
commit 1761e60362
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 63 additions and 54 deletions

View file

@ -342,7 +342,7 @@ pub trait LspAdapter: 'static + Send + Sync {
None
}
fn workspace_configuration(&self, _: &Path, _: &mut AppContext) -> Value {
fn workspace_configuration(&self, _workspace_root: &Path, _cx: &mut AppContext) -> Value {
serde_json::json!({})
}