Lin Sun <sunlin7.m...@gmail.com> writes: > Hi,
Hi Lin, > The tramp is extremely slow on windows, and I found that tramp in > emacs will call git 4 times on startup. > > In the emacs-release package, the `tramp-loaddefs.el` has the copy of > tramp-repository-branch, tramp-repository-version (these two variables > are marked as autoload), it will call git to initialize their values; > and when requiring the `trampvar.el`, these two variables will be > initialize with calling git again. That will call git 4 times. > > This patch tries to avoid these calls, improving the performance a lot. Thanks for the heads-up! > Please help review the patch. Thanks. Well, the patch computes the constants tramp-repository-branch and tramp-repository-version at compile time. The results might be wrong, when Tramp is not compiled but interpreted. I've applioed another change, that Tramp does not call git from tramp-loaddefs.el. This reduces the git calls to two times. Pushed to the repositories. Could you pls check, whether this makes a (sufficient) difference for you? > Lin Best regards, Michael.