On Thu, Nov 24, 2022 at 2:49 AM Dmitry Gutov wrote: > On 23/11/22 22:33, João Távora wrote: > > For my idea to work, project-current would have to be changed to > > > > 1. Call all members of project-find-functions: return the innermost > > project found thus far. > > 2. Not call project-find-functions recursively when called from within a > > function > > in project-find-functions, just return the innermost project found > > thus far. > > > > I don't see any big performance problems in this alternative. > > Might not be much of a difference in a simple configuration, but going > up and down dirs is not free even on a fast SSD, especially as the > number of the elements on this hook grows. > > But where you will definitely see a difference, is when using this with > Tramp. > Have you seen the code I posted? You'll notice that it doesn't do any file system operations, it just does file name operations. And those run in CPU/memory, not file system. So I cannot understand your argument. But I am happy to measure performance in different scenarios, if you'd like to suggest a particularly problematic one. João