branch: elpa/projectile
commit d6bfdff3c262d9f36ec1a9b2e3f502336d37e79f
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Skip projectile-maybe-limit-project-file-buffers on TRAMP
    
    The buffer-limiting function was called before the file-remote-p guard
    in projectile-find-file-hook-function, triggering expensive buffer
    enumeration and file-truename calls on every remote file open.  Move
    it inside the existing TRAMP guard.
---
 projectile.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projectile.el b/projectile.el
index 4a252e3c52..9f12976761 100644
--- a/projectile.el
+++ b/projectile.el
@@ -6454,8 +6454,8 @@ Magit that don't trigger `find-file-hook'."
 The function does pretty much nothing when triggered on remote files
 as all the operations it normally performs are extremely slow over
 tramp."
-  (projectile-maybe-limit-project-file-buffers)
   (unless (file-remote-p default-directory)
+    (projectile-maybe-limit-project-file-buffers)
     (when projectile-dynamic-mode-line
       (projectile-update-mode-line))
     (when projectile-auto-update-cache

Reply via email to