# settings ui: Improve rendering performance \(\#40001\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 186237bb1ab3005d9df797b2160196b2b70e7e76

Requested commit: 186237bb1ab3005d9df797b2160196b2b70e7e76

Commit: 186237bb1ab3005d9df797b2160196b2b70e7e76

Tree: 8bcdf9c1db379027a19c6f4da71168faa3cfadfc

Author: Anthony Eid

Committer: GitHub

## Message

```
settings ui: Improve rendering performance (#40001)

This PR improves the rendering performance of the Settings UI window by
using `gpui::list` to render only the visible contents of a settings
page, instead of rendering the full content of a page. This fixes a lag
that the editor page has in debug builds.

I also added a new field `measuring_behavior` to `ListState` that has
`Visible` and `Measured` variances. `Visible` only measures and caches
the bounds of visible items plus the overdraw pixel offset. `Measure`
will cache all items’ bounds on the first layout phase, which fixes
problems with the scrollbar size/position being miscalculated.

Release Notes:

- N/A

---------

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

## Parents

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

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