# multi_buffer: Don't eagerly clone \`BufferSnapshot\` in \`range_to_buffer_ranges\` \(\#59190\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b6c7496aea2595fdbfbc04b0ac8dd393f363b569

Requested commit: b6c7496aea2595fdbfbc04b0ac8dd393f363b569

Commit: b6c7496aea2595fdbfbc04b0ac8dd393f363b569

Tree: a0860efe212d89abc1f06325427e49b07ce8bf1a

Author: Lukas Wirth

Committer: GitHub

## Message

```
multi_buffer: Don't eagerly clone `BufferSnapshot` in `range_to_buffer_ranges` (#59190)

Both cloning and dropping of these has quite a bit of overhead (despite
them being snapshots), so avoid where possible, especially in display
map syncing

Release Notes:

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

## Parents

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

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