Skip to content

Conversation

Anthony-Eid
Copy link
Contributor

@Anthony-Eid Anthony-Eid commented Oct 11, 2025

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

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 11, 2025
@Anthony-Eid Anthony-Eid marked this pull request as ready for review October 14, 2025 13:23
@probably-neb probably-neb merged commit 186237b into main Oct 15, 2025
22 checks passed
@probably-neb probably-neb deleted the settings-ui-gpui-list branch October 15, 2025 20:48
P1n3appl3 pushed a commit to P1n3appl3/zed that referenced this pull request Oct 18, 2025
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 <[email protected]>
Co-authored-by: Ben Kunkle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants