zed/crates/worktree
Max Brunsfeld 8f942bf647
Use repository mutex more sparingly. Don't hold it while running git status. (#12489)
Previously, each git `Repository` object was held inside of a mutex.
This was needed because libgit2's Repository object is (as one would
expect) not thread safe. But now, the two longest-running git operations
that Zed performs, (`status` and `blame`) do not use libgit2 - they
invoke the `git` executable. For these operations, it's not necessary to
hold a lock on the repository.

In this PR, I've moved our mutex usage so that it only wraps the libgit2
calls, not our `git` subprocess spawns. The main user-facing impact of
this is that the UI is much more responsive when initially opening a
project with a very large git repository (e.g. `chromium`, `webkit`,
`linux`).

Release Notes:

- Improved Zed's responsiveness when initially opening a project
containing a very large git repository.
2024-05-30 09:37:11 -07:00
..
src Use repository mutex more sparingly. Don't hold it while running git status. (#12489) 2024-05-30 09:37:11 -07:00
Cargo.toml Avoid holding worktree lock for a long time while updating large repos' git status (#12266) 2024-05-24 17:41:35 -07:00
LICENSE-GPL Rename 'project_core' crate to 'worktree', make it just about worktrees (#9189) 2024-03-11 11:35:27 -07:00