# Cache font-missing result to avoid unnecessary lookups \(\#4245\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e01850642f22e7342202fbf00c687fb16a99b77d

Requested commit: e01850642f22e7342202fbf00c687fb16a99b77d

Commit: e01850642f22e7342202fbf00c687fb16a99b77d

Tree: 3aa3ebf2c367083171523fd30a84a2f4e10611c3

Author: Thorsten Ball

Committer: GitHub

## Message

```
Cache font-missing result to avoid unnecessary lookups (#4245)

This fixes the performance problem we saw in
https://github.com/zed-industries/community/issues/2405.

In a trace we could see that if a font is missing we'd constantly look
it up and never cache that it's missing.

This changes that and does cache the font-is-missing result.

Drawback is that one would need to restart Zed after installing a
missing font that was configured in settings. That seems acceptable for
now, though.

Release Notes:

- Improved rendering performance when configured fonts are missing on
the system.
```

## Parents

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

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

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