Re: [PATH] * trampvar.el.in (tramp-repository-branch, tramp-repository-version): Avoid to call git for initializing the variables
Lin Sun <[email protected]> Sat, 27 Jul 2024 14:57:15 +0000
| Newsgroups | gmane.emacs.tramp |
|---|---|
| Message-ID | <CABCREdpyapPgTe84x4-sTB-ZcJD5pjFf9t=Vm6+=sGF+u6Hn1g@mail.gmail.com> |
Hi Michael, I tested your patch in my local, it works for me. Thank you ! On Sat, Jul 27, 2024 at 8:25 AM Michael Albinus <[email protected]> wrote: > > Lin Sun <[email protected]> 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.