gitui/asyncgit/src
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
..
asyncjob cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
cached support bare repos (#1028) 2021-12-05 00:35:45 +01:00
sync Rust msrv bump to 1.88 (#2879) 2026-03-19 18:33:52 +00:00
blame.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
branches.rs support fetching branch_infos async 2022-11-21 16:32:17 +01:00
commit_files.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
diff.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
error.rs Use gitoxide for get_tags (#2664) 2025-08-06 14:26:19 -07:00
fetch_job.rs cleanup 2022-09-03 10:22:24 +02:00
filter_commits.rs cancel commit search (#2078) 2024-02-20 19:07:25 +01:00
lib.rs update log (#2766) 2025-10-29 15:27:28 +01:00
progress.rs fix nightly clippy 2022-07-02 08:17:15 +02:00
pull.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
push.rs clippy fixes 2026-03-19 14:13:55 +00:00
push_tags.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
remote_progress.rs cleanup format strings (#2765) 2025-10-29 13:58:27 +01:00
remote_tags.rs support bare repos (#1028) 2021-12-05 00:35:45 +01:00
revlog.rs Fix clippy issues on nightly (#2852) 2026-01-25 16:20:23 -05:00
status.rs perf: prevent repeated status fetches in large repos (#2824) 2026-03-20 01:12:14 +00:00
tags.rs Update gix from 0.71.0 to 0.74.1 (#2745) 2025-10-27 18:37:30 +01:00
treefiles.rs remove debug sleep (fixes #1451) 2022-11-25 21:16:47 +01:00