# editor: Cancel ongoing completion requests more eagerly \(\#12630\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8e7960928809aa8a7edce8cdeec979949e0a5f74

Requested commit: 8e7960928809aa8a7edce8cdeec979949e0a5f74

Commit: 8e7960928809aa8a7edce8cdeec979949e0a5f74

Tree: 18e8aede3bfafb0c4edf10d0ade2b102517ec0d6

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
editor: Cancel ongoing completion requests more eagerly (#12630)

Previously, we were:
- cancelling previous requests only after the latest one has completed
- always running the debounced documentation resolution to completion,
even when we had no need for it.

In this commit, we drop the ongoing completion requests as soon as the
new one is fired.
Fixes #5166 

Release Notes:

- Improved performance and reliability of completions in large
Typescript projects

Co-authored-by: Bennet Bo <bennet@zed.dev>
```

## Parents

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

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