# language: Memoize value of has_edits_since for a given buffer version \(\#13656\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 218629cdd426f3e4bf16667f3cdab1e940464d7d

Requested commit: 218629cdd426f3e4bf16667f3cdab1e940464d7d

Commit: 218629cdd426f3e4bf16667f3cdab1e940464d7d

Tree: fd19b97578d5b438a454fb1ad183bfe17f1c4cfd

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
language: Memoize value of has_edits_since for a given buffer version (#13656)

As a drive-by of https://github.com/zed-industries/zed/pull/13654, I've
noticed that the editor felt sluggish after I've undone the changes made
by the replacement. It turns out that we are repeatedly checking whether
there are any edits to estabilish dirty/conflict state of a buffer, even
though this operation is pure; this PR stores away the result of a
computation and refers to it before rerunning it.

Release Notes:

- Improve editor's performance with large undo histories
```

## Parents

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

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