diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2024-07-07 15:43:15 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-07 15:43:15 +1000 |
commit | b004b2e27529e971a90a8fd6a55143363a729a0d (patch) | |
tree | 20389bdee853445ea4aa5aafa4fc012cfd297b33 /pkg/gui/searching.go | |
parent | a138a31c72a9a52ca7303eebdc676c6a5e1eb255 (diff) | |
parent | 7a670964cd3951c20e42a7b215f403f8ec4136c2 (diff) |
### **PR Description**
In order to optimize the number of git calls made this change implements
a RepoPathCache as the API by which RepoPaths instances are acquired.
This primarily affects app startup and worktree enumeration.
This introduces a new dependency on
[go-memoize](https://github.com/kofalt/go-memoize), which is a
lightweight wrapper around go-cache and singleflight, in order to ensure
that the cache is concurrency safe. (As compared to a simple map, e.g.)
See the go-memoize README for details.
Fixes #3227.
### **Please check if the PR fulfills these requirements**
* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [x] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [x] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [x] Docs (specifically `docs/Config.md`) have been updated if
necessary
* [x] You've read through your own file changes for silly mistakes etc
Diffstat (limited to 'pkg/gui/searching.go')
0 files changed, 0 insertions, 0 deletions