[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up

From: Dmitry Gutov
Subject: Re: emacs-27 b46c75b: xref-matches-in-files: Big Tramp speed-up
Date: Thu, 9 Jan 2020 02:42:17 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 08.01.2020 22:51, Stefan Monnier wrote:
Yes, I saw that, but it's still not clear to me which part of this costs
so much more than tramp-file-local-name itself, nor why.

The whole of it, mostly. I've shown a simple patch which improved performance a lot, by Michael says it's unmaintainable (IIUC):


(and there's a follow-up suggestion later)

By the way, the commit under discussion already references this bug report.

The "remote" pat would presumably be in the DIR argument (DIR would
presumably be the root of the project or something like that).

The current discussion is about xref-matches-in-files where Grep acts on a list of files, not a directory. It's used by both project-find-regexp and dired-do-find-regexp.

Actually, maybe xref could apply `file-local-name` to the root of
the project?

See above. It's not about projects only.

I've considered about having xref-matches-in-files also accept a (REMOTE-ID LOCAL-FILES) struct, but that's also increase in complexity, in all callers and related APIs, which will also affect maintainability. So it's doable, but I'd rather make a good effort and fix it in Tramp to have everyone benefit automatically.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]