|
From: | Dmitry Gutov |
Subject: | bug#47799: 28.0.50; Default `project-files' implementation doesn't work with quoted filenames |
Date: | Mon, 19 Apr 2021 23:48:51 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 19.04.2021 17:48, Philipp Stephani wrote:
It's a realistic use case, and the impact is significant (e.g. 1s to list files, 2s to unquote them all), so please look into this soon. The fix in xref should be simple enough, I'd just like for someone to realistically test it before installing (I can send a patch, if you want).Hah, I wasn't aware that quoting/unquoting is so slow.
It's file listing that is fast, rather. ;-) The project in question has 200'000 files.
Rather than making assumptions in xref-matches-in-files, maybe we could work more with relative filenames. For example: 1. Add another project method "project-relative-files" that returns filenames relative to the root. By default, this would call project-files and make the filenames relative, but project implementations can provide an optimized implementation. 2. Give xref-matches-in-files an optional root directory argument and allow users to pass names relative to that root. Then I think both project and xref could leave these relative filenames alone. WDYT?
We've discussed this before, but it's a change in the API, a +1 method for a very minor feature.
And how will we explain anyway that xref-matches-in-files, when called without the new ROOT argument, doesn't handle remote or quoted file names?
So if you can fix this to avoid performance loss in the general case, that would be a good improvement for now.
[Prev in Thread] | Current Thread | [Next in Thread] |