# gpui: Box \`Window\` instances \(\#40733\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ed822330301a1895df50efa66ce3a6493c5059b6

Requested commit: ed822330301a1895df50efa66ce3a6493c5059b6

Commit: ed822330301a1895df50efa66ce3a6493c5059b6

Tree: 3f77d8500ac0a5c129b46024c7cf73595d20a852

Author: Lukas Wirth

Committer: GitHub

## Message

```
gpui: Box `Window` instances (#40733)

We very frequently move this in and out of the windows slot map on
`update_window_id` calls (and we call this a lot!). This alone showed up
as `memmove`s at roughly 1% perf in Instruments when scrolling a buffer
which makes sense, `Window` itself is 4kb in size. The fix is simple,
just box the `Window` instances, moving a pointer is cheap in
comparison.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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