# Use LazyLock for static JSON schemas \(\#46823\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fd877a9a3dcfc98a152c35806f00faddbc6d0c1b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: fd877a9a3dcfc98a152c35806f00faddbc6d0c1b

Requested commit: fd877a9a3dcfc98a152c35806f00faddbc6d0c1b

Commit: fd877a9a3dcfc98a152c35806f00faddbc6d0c1b

Tree: bd342a74caa76f81e6c09a0bd104885318f33301

Author: Richard Feldman

Committer: GitHub

## Message

```
Use LazyLock for static JSON schemas (#46823)

Static schemas (tasks, snippets, jsonc, keymap, action/*, tsconfig,
package_json, inspector_style) are now computed once on first access
using LazyLock and returned immediately via Task::ready().

These schemas never change at runtime because:
- tasks, snippets, jsonc, inspector_style are derived from static Rust
types
- tsconfig, package_json are bundled JSON files (include_str!)
- keymap and action/* depend only on registered actions, which are
collected at compile/link time via the inventory crate (extensions
cannot add actions)

This eliminates foreground thread blocking for these schema requests.

**New functions added to KeymapFile:**
- `generate_json_schema_from_inventory()`: generates keymap schema
without App context
- `get_action_schema_by_name()`: looks up single action schema without
App context

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

- [445c95aa3cdcc5137e5fcdc75b3e5564f90fc0d2](https://git.cafe/gitcafe/zed/commit/445c95aa3cdcc5137e5fcdc75b3e5564f90fc0d2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/fd877a9a3dcfc98a152c35806f00faddbc6d0c1b?format=markdown)
