# Fix lag when large diff hunk intersects the viewport \(\#26088\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fe18c73a07d32c99bb29095c8235beb9a2627a19

Requested commit: fe18c73a07d32c99bb29095c8235beb9a2627a19

Commit: fe18c73a07d32c99bb29095c8235beb9a2627a19

Tree: fcec78a3925168d3cfe830f108ecea5b319e05f8

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Fix lag when large diff hunk intersects the viewport (#26088)

We were iterating over the row range of a hunk, and inserting into a
hash map for every row.

Release Notes:

- Fixed a performance problem when a large diff hunk was displayed in an
editor.
```

## Parents

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

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