The latest git gained the ability to watch the filesystem for changes to speed up git status and related commands. You need to enable it in your gitconfig explicitly. I've done some informal benchmarking and it measurably speeds up the time spent in a "git status" on the macports-ports repo.
https://github.blog/2022-06-27-highlights-from-git-2-37/#a-builtin-filesystem-monitor-for-windows-and-macos -- David Gilman :DG<