I have a local machine(Centos 7) that mounts a repo from remote machine(Centos 6) using sshfs(2.10). And I can connect them both using ssh in my laptop. My daily workflow is opening my laptop, ssh to the local machine, and work on the mounted repo from the remote machine.
Before mounting, executing git status directly on the remote repo was fast. But after I mounting the remote and executing git status on the local machine, executing git status directly on the remote repo again became slow!
I know that executing git status in the local machine can be slow because of sshfs. But I believe that git commands should always be fast on the remote. So now I want to figure out the reason.
Firstly, I tried to disable caching of sshfs in the local machine with the command like sshfs -o cache=no -o cache_timeout user@ip:/path/to/repo path/to/repo, but the situation was not changed.
After that I tried to close the local machine, ssh to the remote directly and work for a while(about 5 minutes), then I was surprised to find that executing git status became fast again.
So I guess there exists some communication of sshfs between local machine and remote machine that makes git status slow, and after I closing the local machine(i.e. closing the communication), git status become fast again. But I cannot find a way to debug this.
My question is that if there exists some methods to debug this problem, or some answer that can solve it directly.