help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs slow on dired renaming


From: Eli Zaretskii
Subject: Re: emacs slow on dired renaming
Date: Sat, 05 Apr 2014 12:22:30 +0300

> From: Robert Marshall <address@hidden>
> Date: Sat, 05 Apr 2014 09:50:09 +0100
> 
> > If you try renaming a single file with "M-x rename-file RET", does it
> > also take 2 sec?
> >
> There's no apparent delay

On a restart or in a session where moving from Dired is already very
slow?  If the latter, then the actual file I/O is not the reason for
the slowdown, and I suggest to selectively disable portions of your
~/.emacs to find out what causes this.  It could be frequent GC, for
example (set garbage-collection-messages non-nil to see if it is), or
something else that causes excessive processing.  Or maybe you have a
lot of buffers visiting files in a directory being renamed, in which
case Dired will loop over all those files and rename their
default-directory, which could be expensive for a very large number of
such buffers.

Btw, I don't understand this part of your profile:

        - dired-in-this-tree                     10841  38%
         + let                                      23   0%

This says that dired-in-this-tree takes 1/3rd of the run time.  But
dired-in-this-tree is just this:

  (defun dired-in-this-tree (file dir)
    ;;"Is FILE part of the directory tree starting at DIR?"
    (let (case-fold-search)
      (string-match-p (concat "^" (regexp-quote dir)) file)))

So I wonder how come it takes such a large proportion of the time.

As another possible hint, does the number of times dired-create-files
is called (26704) make sense?  Do you really have such a large number
of files in the tree you are moving?  Can you produce a profile for
moving a single file (which you say takes about 2 sec)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]