Skip to content

Commit 3a9825c

Browse files
committed
perf(core): inhibit async listing on remote host
1 parent 1d4f2e2 commit 3a9825c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dirvish.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,8 @@ If the buffer is not available, create it with `dired-noselect'."
13771377
(sorter (cdr (dv-sort-criteria dv)))
13781378
(switches (string-join (list (dv-ls-switches dv) sorter) " ")))
13791379
(unless buffer
1380-
(let ((files-count (length (directory-files entry nil nil t))))
1381-
(if (> files-count dirvish-async-listing-threshold)
1380+
(let ((count (if (file-remote-p entry) 0 (length (directory-files entry nil nil t)))))
1381+
(if (> count dirvish-async-listing-threshold)
13821382
(setq buffer (dirvish--noselect-async entry switches))
13831383
(setq buffer (dired-noselect entry switches))))
13841384
(push (cons entry buffer)

0 commit comments

Comments
 (0)