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 21:00:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: João Távora <joaotavora@gmail.com>
>> Cc: drew.adams@oracle.com,  emacs-devel@gnu.org, monnier@iro.umontreal.ca
>> Date: Tue, 02 Jun 2020 20:11:49 +0100
>> 
>>                - complete-with-action                          1125  75%
>>                   - cond                                         1125  75%
>>                    - funcall                                     1125  75%
>>                     - all-completions                              24   1%
>>                        #<compiled 0x15809d82b069>                  15   1%
>
> This looks like funcall takes most of the time, so it's important to
> understand which function is being called here.

I think it's something in simple.el, given as the profile changes
completely once I load that file versus loading simple.elc.

>>                       - 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%
>
> Is this real? all-completions calls some lambda which itself calls
> all-completions?

It might be yes, judging from the docstring, the C implementation of
all-completions, and the evidence we're looking at.

>>                            - 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%
>
> What are all those lambda-functions?

No idea.  I'd suppose they are the functions who are checking the
predicate against the symbols in obarray, since we want only the symbols
that verify commandp and aren't marked as obsolete.

I've expanded the first two lambdas of the 5 we have in total.  I think
that's the amount of types I pressed 'M-x C-g' waiting for the
completions to show up between the M-x and the C-g.

None of this was with an Emacs -Q, though.  If I use an Emacs -Q I just
have one of those mysterious lambdas, even if I do do the 'M-x
C-g' multiple times.

   - completion--some                         111  42%
    - #<compiled -0x1ed1f57d...                111  42%
     - completion-flex-all-c...                111  42%
      - completion-substring...                104  39%
       - completion-pcm--all...                103  39%
        - all-completions                     102  38%
         - #<lambda -0x1d5fc...                102  38%
          - if                                102  38%
           - let                              102  38%
            - complete-with-action            102  38%
             - all-completions                  8   3%
              - #<lambda 0x3...                  6   2%
               - and                            5   1%

Anyway, I'd wait for Stefan to now, or at least for a comparative study
with the other alternatives that reported instantaneous responses to
M-x, since with Emacs -Q we can also get such a response.

Thanks for your help,
João



reply via email to

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