unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Tassilo Horn <tsdh@gnu.org>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: Too long completion delay time in LISP interaction mode.
Date: Wed, 20 Oct 2021 17:17:18 +0800	[thread overview]
Message-ID: <CAGP6PO+ypF214qFE8mSwnc74d0Jb_cGHDM0v68qpuBeKzRh6eQ@mail.gmail.com> (raw)
In-Reply-To: <87czo0rvky.fsf@gnu.org>

On Wed, Oct 20, 2021 at 3:42 PM Tassilo Horn <tsdh@gnu.org> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> >> To be frank, I don't know how to expand it.
> >
> > Shame on me. It can be expanded by clicking the + sign again and
> > again.
>
> Hehe. :-)
>
> > See the following:
> >
> >          495  86% - command-execute
> >          495  86%  - funcall-interactively
> >          487  85%   - counsel-M-x
> >          487  85%    - let
> >          458  80%     - ivy-read
> >          458  80%      - apply
> >          454  79%       - #<lambda 0x1de0670da47deef2>
> >          454  79%        - let*
> >          454  79%         - progn
> >          454  79%          - progn
> >          454  79%           - let*
> >          404  70%            - ivy--reset-state
> >          404  70%             - let*
> >          404  70%              - let
> >          344  60%               - if
> >          340  59%                - progn
> >          340  59%                 - setq
> >          336  58%                  - sort
> >          308  54%                   - ivy-prescient-sort-function
> >          264  46%                    - prescient-sort-compare
>
> So here you can see that prescient seems to have quite some impact on
> sorting the candidates for M-x.

I use the following prescient relevant configuration:

--8<---------------cut here---------------start------------->8---
;;https://github.com/daviwil/emacs-from-scratch/wiki/LSP-Python-(pyright)-config-in-emacs-from-scratch#prescient
(use-package prescient
  :diminish
  :config
  (prescient-persist-mode)
  )


;;https://github.com/daviwil/emacs-from-scratch/wiki/LSP-Python-(pyright)-config-in-emacs-from-scratch#prescient-1
(use-package company-prescient
  :init (setq ;;https://github.com/company-mode/company-mode/issues/1141#issuecomment-884570548
         company-prescient-sort-length-enable nil)
  :config
  (company-prescient-mode 1)
  )

;;https://github.com/abo-abo/swiper/issues/2899#issuecomment-890300284
(use-package ivy-prescient
  :init
  (setq prescient-filter-method '(literal fuzzy regexp initialism)
    ;;https://github.com/raxod502/prescient.el#ivy-specific
        ivy-prescient-enable-filtering nil)
  :config
  ;;https://github.com/daviwil/emacs-from-scratch/wiki/LSP-Python-(pyright)-config-in-emacs-from-scratch#prescient
  (ivy-prescient-mode 1) ; According to my attempt, use this
configuration in :init will defeat swiper
  )
--8<---------------cut here---------------end------------->8---


> >           65  11% - ...
> >           44   7%  - completion-all-completions
> >           44   7%   - completion--nth-completion
> >           44   7%    - completion--some
> >           44   7%     - #<compiled 0x194abcb52c81cd5e>
> >           44   7%      - orderless-all-completions
> >           44   7%       - let
> >           44   7%        - orderless-filter
> >           44   7%         - let
> >           44   7%          - unwind-protect
> >           44   7%           - progn
> >           44   7%            - let*
> >           44   7%             - progn
> >           44   7%              - let*
> >           44   7%               - let
> >           44   7%                - let*
> >           44   7%                   progn
>
> And the above is the actual "(map" completion part which seems to be
> dominated by the orderless style.  So I guess you've now replaced
> hotfuzz with orderless, right?

To be frank, due to my negligence, I've set orderless first and then
hotfuzz in the init.el file at the same time. The following is the
configuration of orderless:

(use-package orderless
  :init (icomplete-mode)
  :custom (completion-styles '(orderless)))


After I disabled the hotfuzz, the orderless comes into play. But
fortunately, it seems that orderless doesn't have so much penalty on
performance. For convenience's sake, I decided to stick with it.

HZ



  reply	other threads:[~2021-10-20  9:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  3:11 Too long completion delay time in LISP interaction mode Hongyi Zhao
2021-10-20  4:11 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-20  4:27   ` Hongyi Zhao
2021-10-20  5:01 ` Tassilo Horn
2021-10-20  5:29   ` Hongyi Zhao
2021-10-20  5:49     ` Tassilo Horn
2021-10-20  6:11       ` Hongyi Zhao
2021-10-20  6:19         ` Tassilo Horn
2021-10-20  6:42           ` Hongyi Zhao
2021-10-20  7:20             ` Tassilo Horn
2021-10-20  7:35               ` Hongyi Zhao
2021-10-21  5:32               ` Hongyi Zhao
2021-10-21  5:45                 ` Tassilo Horn
2021-10-21  6:14                   ` Hongyi Zhao
2021-10-21  8:50                     ` Tassilo Horn
2021-10-21 10:38                       ` Hongyi Zhao
2021-10-20  7:24             ` Hongyi Zhao
2021-10-20  7:37               ` Tassilo Horn
2021-10-20  9:17                 ` Hongyi Zhao [this message]
2021-10-20  6:24         ` Hongyi Zhao
2021-10-20  5:58     ` Hongyi Zhao
2021-10-20 15:30       ` [External] : " Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGP6PO+ypF214qFE8mSwnc74d0Jb_cGHDM0v68qpuBeKzRh6eQ@mail.gmail.com \
    --to=hongyi.zhao@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).