# worktree: Improve performance with large \# of repositories \(\#35052\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 631f9a1b31c16b53e65126163094622f54669960

Requested commit: 631f9a1b31c16b53e65126163094622f54669960

Commit: 631f9a1b31c16b53e65126163094622f54669960

Tree: f7f7d417dee34917f46c978e43cc2865e9431247

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
worktree: Improve performance with large # of repositories (#35052)

In this PR we've reworked how git status updates are processed. Most
notable change is moving the processing into a background thread (and
splitting it across multiple background workers). We believe it is safe
to do so, as worktree events are not deterministic (fs updates are not
guaranteed to come in any order etc), so I've figured that git store
should not be overly order-reliant anyways.

Note that this PR does not solve perf issues wholesale - other parts of
the system are still slow to process stuff (which I plan to nuke soon).

Related to #34302

Release Notes:

- Improved Zed's performance in projects with large # of repositories

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
```

## Parents

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

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