emacs-devel
[Top][All Lists]
Advanced

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

Re: Add user customization fido-completion-styles


From: João Távora
Subject: Re: Add user customization fido-completion-styles
Date: Tue, 02 Jun 2020 20:11:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> What is 'collection'? is it a function?

I suppose it can be, yes.

> Anyway, I suggest to run the same experiment after loading all the
> code involved in this as *.el files (not *.elc).  That should show a
> more detailed profile, which hopefully will give a clue.

That did give some clues.  When loading minibuffer.el that section
becomes:

               - complete-with-action                          1125  75%
                  - cond                                         1125  75%
                   - funcall                                     1125  75%
                    - all-completions                              24   1%
                       #<compiled 0x15809d82b069>                  15   1%

Which shows there's an compiled function coming from somewhere else,
likely simple.el.  When I load simple.el, the profile changes
dramatically, and becomes so deep that it's impossivle to read because
M-x profiler-report truncates the names of functions at a certain point.

So then I remembered loading the compiled minibuffer.elc and loading the
uncompiled simple.el, and I got more interesting results, such as these:

                   - #<compiled 0x15809c619759>                  1264  82%
                    - completion-flex-all-completions               1233  80%
                     - completion-substring--all-completions               1212 
 78%
                      - completion-pcm--all-completions               1209  78%
                       - all-completions                         1209  78%
                        - #<lambda -0x5acbf46d069cde1>                318  20%
                         - let                                    318  20%
                          - complete-with-action                  318  20%
                           - all-completions                       10   0%
                            - #<lambda -0xded78e903380374>                  5   
0%
                             - and                                  5   0%
                                funcall                             4   0%
                              - or                                  1   0%
                                 equal                              1   0%
                        - #<lambda 0xf61f9dacf96321f>                197  12%
                         - let                                    197  12%
                          - complete-with-action                  197  12%
                           - all-completions                        7   0%
                            - #<lambda 0x7121b4e1cc7fc8f>                  4   
0%
                             - and                                  4   0%
                                funcall                             4   0%
                        - #<lambda 0xf590d1eef96321f>                180  11%
                         - let                                    180  11%
                          - complete-with-action                  180  11%
                           - all-completions                        5   0%
                            - #<lambda 0x7018618bcc7fc8f>                  4   
0%
                             - and                                  4   0%
                                funcall                             4   0%
                        + #<lambda 0xf61e0170f96321f>                177  11%
                        + #<lambda 0xf61d91a2f96321f>                172  11%
                        + #<lambda -0x15745e458069cde1>                165  10%
                     + completion-pcm--hilit-commonality                 21   1%

Which are still kind of confusing, but at least kinda point to the time
wasters being in simple.el, i.e. in the "client" code of the completions
code, and _not_ in minibuffer.el, where the completion algorithm itself
lives.

But maybe I'm totally mistaken.  Stefan is probably the best person to
shed some light here.

João



reply via email to

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