unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs
@ 2015-07-02 10:27 Sebastien Vauban
  2015-07-02 14:57 ` Eli Zaretskii
       [not found] ` <mailman.6180.1435849086.904.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Sebastien Vauban @ 2015-07-02 10:27 UTC (permalink / raw)
  To: 20961-ubl+/3LiMTaZdePnXv/OxA

Now that profiling works under Cygwin Emacs (thanks Ken and Eli!), I can
report the following when playing a couple of seconds with Dired-jump
(which I find much slower on Cygwin Emacs than on Windows Emacs).

--8<---------------cut here---------------start------------->8---
- ...                                                         6440  59%
 - find-file                                                  6315  58%
  - apply                                                     6315  58%
   - ad-Advice-find-file                                      6315  58%
    - let                                                     6315  58%
     - let                                                    6315  58%
      - setq                                                  6315  58%
       - with-no-warnings                                     6315  58%
        - funcall                                             6315  58%
         - #<compiled 0x4018ad5f>                             6315  58%
          - find-file-noselect                                6315  58%
           - run-hook-with-args-until-success                 6315  58%
            - dired-noselect                                  6315  58%
             - dired-internal-noselect                        6315  58%
              - dired-readin                                  6311  58%
               - dired-readin-insert                          6290  57%
                - dired-insert-directory                      6290  57%
                 - insert-directory                           6289  57%
                  - apply                                     6289  57%
                   - ls-lisp--insert-directory                6289  57%
                    - get-free-disk-space                     6288  57%
                     - process-file                           6288  57%
                        apply                                 6288  57%
                    + byte-code                                  1   0%
                 + dired-insert-set-properties                   1   0%
               + run-hooks                                      21   0%
              + create-file-buffer                               3   0%
              + dired-mode                                       1   0%
   Automatic GC                                                125   1%
- command-execute                                             4370  40%
 - apply                                                      4370  40%
  - ad-Advice-command-execute                                 4370  40%
   - let                                                      4370  40%
    - setq                                                    4370  40%
     - with-no-warnings                                       4370  40%
      - funcall                                               4370  40%
       - #<compiled 0x401aa6bf>                               4370  40%
        - call-interactively                                  4370  40%
         - helm-M-x                                           4354  40%
          - command-execute                                   4354  40%
           - apply                                            4354  40%
            - ad-Advice-command-execute                       4354  40%
             - let                                            4354  40%
              - setq                                          4354  40%
               - with-no-warnings                             4354  40%
                - funcall                                     4354  40%
                 - #<compiled 0x401aa6bf>                     4354  40%
                  - call-interactively                        4354  40%
                   - byte-code                                4351  39%
                    - helm-M-x-read-extended-command          4351  39%
                     - helm-comp-read                         4351  39%
                      - helm                                  4351  39%
                       - apply                                4351  39%
                        - helm                                4351  39%
                         - apply                              4351  39%
                          - helm-internal                     4351  39%
                           - funcall                          4351  39%
                            - #<compiled 0x180e4dbe5>         4351  39%
                             - helm-read-pattern-maybe        4330  39%
                              + read-from-minibuffer           323   2%
                              + helm-update                      4   0%
                             + helm-initialize                  19   0%
                             + helm-display-buffer               2   0%
                   + profiler-report                             3   0%
         + diredp-previous-line                                  7   0%
         + diredp-next-line                                      5   0%
+ redisplay_internal (C function)                               45   0%
+ timer-event-handler                                           21   0%
--8<---------------cut here---------------end--------------->8---

In GNU Emacs 24.5.1 (x86_64-unknown-cygwin)
 of 2015-06-23 on desktop-new
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --srcdir=/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/src/emacs-24.5 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/emacs --htmldir=/usr/share/doc/emacs/html -C --with-w32
 'CFLAGS=-ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/build=/usr/src/debug/emacs-24.5-2 -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.5-2.x86_64/src/emacs-24.5=/usr/src/debug/emacs-24.5-2'
 CPPFLAGS= LDFLAGS='

As I see there's an advice on `find-file', yes that's true; here's mine:

--8<---------------cut here---------------start------------->8---
  (defadvice find-file (around my/find-file activate)
    "Open the file named FILENAME and report time spent."
    (let ((filename (ad-get-arg 0))
          (find-file-time-start (float-time)))
      (message "(Info) Finding file %s..." filename)
      ad-do-it
      (message "(Info) Found file %s in %.2f s" filename
               (- (float-time) find-file-time-start))))
--8<---------------cut here---------------end--------------->8---

Other couple of (innocent) customs:

--8<---------------cut here---------------start------------->8---
  (global-set-key (kbd "M-x") #'helm-M-x)

  (require 'dired-x)
--8<---------------cut here---------------end--------------->8---





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs
  2015-07-02 10:27 bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs Sebastien Vauban
@ 2015-07-02 14:57 ` Eli Zaretskii
       [not found] ` <mailman.6180.1435849086.904.bug-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2015-07-02 14:57 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: 20961

> From: Sebastien Vauban <sva-news@mygooglest.com>
> Date: Thu, 02 Jul 2015 12:27:11 +0200
> 
> Now that profiling works under Cygwin Emacs (thanks Ken and Eli!), I can
> report the following when playing a couple of seconds with Dired-jump
> (which I find much slower on Cygwin Emacs than on Windows Emacs).
> 
> --8<---------------cut here---------------start------------->8---
> - ...                                                         6440  59%
>  - find-file                                                  6315  58%
>   - apply                                                     6315  58%
>    - ad-Advice-find-file                                      6315  58%
>     - let                                                     6315  58%
>      - let                                                    6315  58%
>       - setq                                                  6315  58%
>        - with-no-warnings                                     6315  58%
>         - funcall                                             6315  58%
>          - #<compiled 0x4018ad5f>                             6315  58%
>           - find-file-noselect                                6315  58%
>            - run-hook-with-args-until-success                 6315  58%
>             - dired-noselect                                  6315  58%
>              - dired-internal-noselect                        6315  58%
>               - dired-readin                                  6311  58%
>                - dired-readin-insert                          6290  57%
>                 - dired-insert-directory                      6290  57%
>                  - insert-directory                           6289  57%
>                   - apply                                     6289  57%
>                    - ls-lisp--insert-directory                6289  57%
>                     - get-free-disk-space                     6288  57%
>                      - process-file                           6288  57%
>                         apply                                 6288  57%

This seems to point to get-free-disk-space, which on Cygwin invokes
the 'df' program, whereas the native w32 build calls a function to get
the same info.

You also seem to have Helm active, so perhaps these two factors
together make 'df' invocation much slower than the w32 API call.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs
       [not found]   ` <mailman.6180.1435849086.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
@ 2015-07-03  8:25     ` Sebastien Vauban
  2016-12-07 20:24       ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastien Vauban @ 2015-07-03  8:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20961-ubl+/3LiMTaZdePnXv/OxA

Eli Zaretskii <eliz-mXXj517/zsQ@public.gmane.org> writes:
>> From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
>> Date: Thu, 02 Jul 2015 12:27:11 +0200
>> 
>> Now that profiling works under Cygwin Emacs (thanks Ken and Eli!), I can
>> report the following when playing a couple of seconds with Dired-jump
>> (which I find much slower on Cygwin Emacs than on Windows Emacs).
>> 
>> --8<---------------cut here---------------start------------->8---
>> - ...                                                         6440  59%
>>  - find-file                                                  6315  58%
>>   - apply                                                     6315  58%
>>    - ad-Advice-find-file                                      6315  58%
>>     - let                                                     6315  58%
>>      - let                                                    6315  58%
>>       - setq                                                  6315  58%
>>        - with-no-warnings                                     6315  58%
>>         - funcall                                             6315  58%
>>          - #<compiled 0x4018ad5f>                             6315  58%
>>           - find-file-noselect                                6315  58%
>>            - run-hook-with-args-until-success                 6315  58%
>>             - dired-noselect                                  6315  58%
>>              - dired-internal-noselect                        6315  58%
>>               - dired-readin                                  6311  58%
>>                - dired-readin-insert                          6290  57%
>>                 - dired-insert-directory                      6290  57%
>>                  - insert-directory                           6289  57%
>>                   - apply                                     6289  57%
>>                    - ls-lisp--insert-directory                6289  57%
>>                     - get-free-disk-space                     6288  57%
>>                      - process-file                           6288  57%
>>                         apply                                 6288  57%
>
> This seems to point to get-free-disk-space, which on Cygwin invokes
> the 'df' program, whereas the native w32 build calls a function to get
> the same info.

I never had noticed that the "available" space was shown in
Dired... Hard to read, BTW, a figure such as "10232288" (neither comma,
nor abbreviation like 10.2G).

And, in fact, that information could be dropped for my own usage... I'm
simply interested by the contents of the directories.

> You also seem to have Helm active, so perhaps these two factors
> together make 'df' invocation much slower than the w32 API call.

Yes, I do have Helm active, but I don't think it comes here to play --
and, in fact, it's not even reported in that part of the trace.

Best regards,
  Seb

-- 
Sebastien Vauban





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs
  2015-07-03  8:25     ` Sebastien Vauban
@ 2016-12-07 20:24       ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2016-12-07 20:24 UTC (permalink / raw)
  To: 20961-done


This doesn't seem to be leading anywhere, so after 18 months with no
comments I am closing it.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-07 20:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-02 10:27 bug#20961: 24.5; `dired-jump' quite slow under Cygwin Emacs Sebastien Vauban
2015-07-02 14:57 ` Eli Zaretskii
     [not found] ` <mailman.6180.1435849086.904.bug-gnu-emacs@gnu.org>
     [not found]   ` <mailman.6180.1435849086.904.bug-gnu-emacs-mXXj517/zsQ@public.gmane.org>
2015-07-03  8:25     ` Sebastien Vauban
2016-12-07 20:24       ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).