Subject: bug#73718: 31.0.50; Severe performance issue with Tramp and project-mode-line-format

From: Dmitry Gutov <[email-masked]>
Date: Fri, 11 Oct 2024 03:33:05 +0300

On 10/10/2024 12:57, Michael Albinus via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
>> I wonder if we'll need to disable project-mode-line in remote files
>> altogether, or if this is a problem that could be solved in Tramp
>> (with extra caching?)
> What do you think should be cached in Tramp?

Not sure if more cache should be the answer here, but in the profile I 
see the hack-dir-local-variables call.

So first, it should do nothing unless enable-remote-dir-locals is set to 
t (right?), so my first guess would be Ergus has customized that var. 
Maybe try turning it off, does that lose some features that you use?

Second, I suppose Tramp could do some caching for the result of 
hack-dir-local--get-variables (just time-based), but I'm not sure how 
much it will help, on average. Only every 100th redisplay causing a 
stutter would still be a problem.