Subject: bug#36733: 27.0.50; Eshell taking long time to enter directory after TAB completion

From: Jean Louis <[email-masked]>
Date: Sat, 20 Jul 2019 11:07:20 +0200

This is what I have done:

$ emacs -Q

Then I started profiler, and within Emacs I went
to em-dirs.el.gz and clicked L to load the file

Then I started eshell and did following:

Welcome to the Emacs shell

~ $ cd Programming/
~/Programming $ cd ..
~ $ cd Documents/
~/Documents $ cd ..
~ $ cd tmp
~/tmp $ cd ..
~ $ cd tmp/
~/tmp $ cd ..
~ $ cd Media/
~/Media $

Here is the report:

- completion-in-region--postch                                    348  85%
 - #<compiled 0xd05b1d>                                           348  85%
  - pcomplete-completions-at-point                                348  85%
   - pcomplete-completions                                        348  85%
    - #<compiled 0xd04211>                                        348  85%
     - pcomplete--here                                            348  85%
      - #<compiled 0xd041fd>                                      348  85%
       - eshell-complete-commands-list                            151  37%
        - pcomplete-uniquify-list                                   4   0%
           sort                                                     1   0%
        - eshell-winnow-list                                        2   0%
           eshell-find-alias-function                               1   0%
- ...                                                              49  12%
   Automatic GC                                                    47  11%
 - minibuffer-complete                                              2   0%
  - completion-in-region                                            2   0%
   - completion--in-region                                          2   0%
    - #<compiled 0xcfe355>                                          2   0%
     - apply                                                        2   0%
      - #<compiled 0x1ffde1d7d889>                                  2   0%
       - completion--in-region-1                                    2   0%
        - completion--do-completion                                 2   0%
         - completion-try-completion                                2   0%
          - completion--nth-completion                              2   0%
           - completion--some                                       2   0%
            - #<compiled 0xcfe37d>                                  2   0%
             - completion-basic-try-completion                      2   0%
              - try-completion                                      2   0%
               - #<compiled 0x1ffde1da8f4b>                         2   0%
                  complete-with-action                              2   0%
- command-execute                                                  11   2%
 - call-interactively                                              10   2%
  - funcall-interactively                                           8   1%
   - execute-extended-command                                       7   1%
    - command-execute                                               6   1%
     - call-interactively                                           6   1%
      - funcall-interactively                                       6   1%
       - eshell                                                     5   1%
        - eshell-mode                                               5   1%
         - load                                                     2   0%
          - file-truename                                           1   0%
           - file-truename                                          1   0%
              file-truename                                         1   0%
          - byte-code                                               1   0%
           - require                                                1   0%
            - byte-code                                             1   0%
             - require                                              1   0%
              - defvar                                              1   0%
               - byte-code                                          1   0%
                - substitute-key-definition                         1   0%
                 - map-keymap                                       1   0%
                  - #<compiled 0xd11045>                            1   0%
                   - substitute-key-definition-key                  1   0%
                    - substitute-key-definition                     1   0%
                     - map-keymap                                   1   0%
                        #<compiled 0xd11075>                        1   0%
         - run-hooks                                                1   0%
          - eshell-emit-prompt                                      1   0%
           - eshell-output-filter                                   1   0%
            - eshell-run-output-filters                             1   0%
             - run-hooks                                            1   0%
              - eshell-postoutput-scroll-to-bottom                  1   0%
                 walk-windows                                       1   0%
         profiler-report                                            1   0%
    - sit-for                                                       1   0%
       read-event                                                   1   0%
   - eshell-send-input                                              1   0%
    - eval                                                          1   0%
     - eshell-commands                                              1   0%
      - let                                                         1   0%
       - progn                                                      1   0%
        - run-hooks                                                 1   0%
         - eshell-emit-prompt                                       1   0%
          - eshell-output-filter                                    1   0%
           - eshell-run-output-filters                              1   0%
            - run-hooks                                             1   0%
             - eshell-postoutput-scroll-to-bottom                   1   0%
                walk-windows                                        1   0%
  - byte-code                                                       2   0%
   - read-extended-command                                          2   0%
    - completing-read                                               2   0%
     - completing-read-default                                      2   0%
        read-from-minibuffer                                        2   0%