[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 14:56:31 +0300 |
> From: Robert Marshall <spam@capuchin.co.uk>
> Date: Sat, 05 Apr 2014 12:09:42 +0100
>
> > 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)?
> >
>
> This then (26704) - as you see from my comment about the jpg's which are
> the only files being moved - doesn't appear to make any sense - I didn't
> realise that number was the number of times the function was called. 10
> files only are being moved none of which are directories, none of them
> are links to other files
No, wait, I think I was wrong -- this is the number of times the
profiler sampling found Emacs inside the function, not the number of
calls. But that also sounds too large, as you say you were moving 10
files with 2 sec per file. That should give 20000 samples (one sample
each millisecond), not 26700.
> Here's moving a single file (using 'R' in a dired buffer) - the full trace
> rather than just a
> selection from the report (again a jpg) from ~/Pictures to
> ~/Pictures/yy; 1083 calls to dired-do-rename(!). Could there be some
> recursive calls somehow, why is command-execute being called 1227 times?!
>
> - command-execute 1227 97%
This is 1.2 sec, so it looks about OK.
> - call-interactively 1227 97%
> - dired-do-rename 1083 86%
> - dired-do-create-files 1083 86%
> - dired-create-files 962 76%
> - byte-code 952 75%
> - dired-rename-file 766 61%
> - dired-rename-subdir 568 45%
> - dired-fun-in-all-buffers 180 14%
According to this, dired-rename-subdir, dired-rename-file, and
dired-create-files took 70% of the time. But I have no idea why.
Did you try turning on garbage-collection-messages?
If that doesn't give any clues, I guess the only way is to selectively
disable portions of your ~/.emacs, to find which part causes this.
Alternatively, try running "emacs -Q" for some time, and see if things
get slower there as well.
- Re: emacs slow on dired renaming, (continued)
- Re: emacs slow on dired renaming, Eli Zaretskii, 2014/04/03
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/03
- Re: emacs slow on dired renaming, Eli Zaretskii, 2014/04/03
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/04
- Re: emacs slow on dired renaming, Eli Zaretskii, 2014/04/04
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/05
- Re: emacs slow on dired renaming, Eli Zaretskii, 2014/04/05
- Re: emacs slow on dired renaming, Stefan Monnier, 2014/04/05
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/05
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/05
- Re: emacs slow on dired renaming,
Eli Zaretskii <=
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/05
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/06
- Re: emacs slow on dired renaming, Eli Zaretskii, 2014/04/06
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/06
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/09
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/09
- Re: emacs slow on dired renaming, Stefan Monnier, 2014/04/09
- Message not available
- Re: emacs slow on dired renaming, Robert Marshall, 2014/04/09