[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Too long completion delay time in LISP interaction mode.
From: |
Tassilo Horn |
Subject: |
Re: Too long completion delay time in LISP interaction mode. |
Date: |
Wed, 20 Oct 2021 07:49:40 +0200 |
User-agent: |
mu4e 1.7.0; emacs 29.0.50 |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>> First, I'd try to isolate where the slowdown happens. The
>> screenshots suggests you are using company-mode with custom hacks to
>> get the numbering of candidates and you are using some fuzzy
>> completion-style.
>>
>> So I'd start with emacs -Q and typing (map<TAB> in *scratch* to get
>> the *Completions* buffer. That will probably be fast but deliver
>> less results because of the default value of `completion-styles'.
>> Then I'd try out your settings of `completion-styles' (and
>
> `C-h o completion-styles RET'
>
> completion-styles is a variable defined in ‘minibuffer.el’.
>
> Its value is (hotfuzz)
Never heard of it. But is it a suitable catch-all completion style,
i.e., suitable for using it without another more prefix-oriented style
preceeding it? FWIW, when I type "(map", I'm most probably not
interested in having smartparens-mode, or
lsp:document-symbol-capabilities-hierarchical-document-symbol-support?
showing up as the top candidates but more in mapcar, mapc, mapcan, you
name it...
>> Also, using the profiler might shed some light on where the time is
>> spent, see (info "(elisp) Profiling").
>
> `M-x profiler-start RET cpu and mem RET'
I think you only need cpu here.
> Typeset (map) in scratch buffer, and then
>
> `M-x profiler-report RET', gives the following results:
>
> 262,542,852 87% - command-execute
> 262,542,852 87% - funcall-interactively
> 262,538,196 87% - counsel-M-x
> 262,538,196 87% - let
> 262,355,940 87% - ivy-read
> 262,355,940 87% - apply
> 262,354,884 87% + #<lambda 0x1b9d5ef2eb92a3f2>
> 182,256 0% + counsel--M-x-externs
So the bottleneck is in the lambda which you didn't expand. But I'm
also not sure if you are profiling the right thing because I don't think
that in-buffer completion (in terms of `completion-at-point-functions')
starts with M-x (or counsel-M-x).
Bye,
Tassilo
- Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/19
- Re: Too long completion delay time in LISP interaction mode., Emanuel Berg, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Tassilo Horn, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode.,
Tassilo Horn <=
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Tassilo Horn, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Tassilo Horn, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/20
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/21
- Re: Too long completion delay time in LISP interaction mode., Tassilo Horn, 2021/10/21
- Re: Too long completion delay time in LISP interaction mode., Hongyi Zhao, 2021/10/21
- Re: Too long completion delay time in LISP interaction mode., Tassilo Horn, 2021/10/21