# Cache font-missing result to avoid unnecessary lookups · gitcafe/zed

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

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

Visibility: public

Requested revision: 4800991f28b220f07d30be12c040aeb11356e321

Requested commit: 4800991f28b220f07d30be12c040aeb11356e321

Commit: 4800991f28b220f07d30be12c040aeb11356e321

Tree: e6419870a46f570a2809b5396a6dd292bc16483d

Author: Thorsten Ball

Committer: Thorsten Ball

## Message

```
Cache font-missing result to avoid unnecessary lookups

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.

Co-authored-by: Antonio <antonio@zed.dev>

```

## Parents

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

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