]> git.eshelyaron.com Git - emacs.git/commit
Un-obsolete dired-in-this-tree-p and use it again in certain places.
authorTassilo Horn <tsdh@gnu.org>
Sun, 8 Aug 2021 14:45:50 +0000 (16:45 +0200)
committerTassilo Horn <tsdh@gnu.org>
Sun, 8 Aug 2021 19:06:17 +0000 (21:06 +0200)
commit61677ac3e4685d8f81c3b90eb751d9b5e8a3732d
tree77141521ecc1fce031ec4513c6241eb72a66ec2a
parent051434fdefd6418bf1f0cd28c087b31cb3921f48
Un-obsolete dired-in-this-tree-p and use it again in certain places.

This reverts parts of b425966b07, and 7b50ed553f, i.e. it reverts the
obsoletion of dired-in-this-tree-p and switches some new callers of
file-in-directory-p back to using dired-in-this-tree-p.

It turned out that using file-in-directory-p can be a major
performance regression in case you have a dired buffer of a remote
directory which has become (almost) inaccessible.

Any attempt to open a new dired buffer is checking if a buffer for
that directory already exists (in terms of dired-buffers-for-dir)
which meant that file-in-directory-p was called with the directory of
any existing dired buffer including the inaccessible one where the
file-truename call in file-in-directory-p could block for seconds or
even minutes.

* lisp/dired.el (dired-in-this-tree-p): Undo obsoletion.
(dired-buffers-for-dir): Use dired-in-this-tree-p as before.
* lisp/dired-aux.el (dired-kill-tree,dired-tree-down): Une
dired-in-this-tree-p as before.
lisp/dired-aux.el
lisp/dired.el