gitui/asyncgit
Danny Stoll 49555ce966
perf: prevent repeated status fetches in large repos (#2824)
* perf: prevent repeated status fetches in large repos

Replace time-based cache invalidation with a generation counter.

The old `StatusParams` included a millisecond timestamp (tick) in its
hash, causing the cache to invalidate on every UI tick. For large repos
with millions of files, this led to repeated index loading and 5+ minute load times.

This change uses a different strategy to manage cache invalidation:
- Remove tick from StatusParams hash
- Add generation counter that increments after each fetch completes
- Include generation in cache hash

This ensures:
- No repeated fetches while one is already pending, making gitui usable
  in large repos
- New fetch starts immediately after completion, keeping gitui responsive
  in small repos
- External file changes will still be detected on the next fetch cycle

* fix changelog

---------

Co-authored-by: Daniel Stoll <dstoll@radix.trade>
Co-authored-by: extrawurst <776816+extrawurst@users.noreply.github.com>
Co-authored-by: extrawurst <mail@rusticorn.com>
2026-03-20 01:12:14 +00:00
..
src perf: prevent repeated status fetches in large repos (#2824) 2026-03-20 01:12:14 +00:00
Cargo.toml Bump gix from 0.77.0 to 0.78.0 (#2849) 2026-01-23 21:05:05 +01:00
LICENSE.md chore: Add LICENSE file into the sub-crates 2020-05-28 16:11:54 +02:00
README.md little more documentation 2020-07-08 00:00:17 +02:00

asyncgit

allow using git2 in an asynchronous context

This crate is designed as part of the gitui project.

asyncgit provides the primary interface to interact with git repositories. It is split into the main module and a sync part. The latter provides convenience wrapper for typical usage patterns against git repositories.

The primary goal however is to allow putting certain (potentially) long running git2 calls onto a thread pool.crossbeam-channel is then used to wait for a notification confirming the result.

In gitui this allows the main-thread and therefore the ui to stay responsive.