all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: yikai@z1k.dev, 59678@debbugs.gnu.org
Subject: bug#59678: [PATCH] sh-script: use completion-table-with-cache to improve performance
Date: Thu, 01 Dec 2022 15:30:04 -0500	[thread overview]
Message-ID: <jwvbkoman0a.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83wn7bgm9y.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 01 Dec 2022 17:46:01 +0200")

>> I found that the auto-completion on .sh files (with company-mode) was
>> pretty slow (takes several seconds).  It turns out that company-mode
>> would call the capf function with 'metadata action for each
>> candidate, where each function call would need to list all the
>> cmds. In this patch, I modified the code to use
>> completion-table-with-cache which fixes the problem for me.
>
> Stefan, any comments?

Looks OK to me.  The description of the problem looks concerning, tho:
if Company really calls the completion table with `metadata` once per
candidate, then there's a bug in company.


        Stefan






  reply	other threads:[~2022-12-01 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 14:30 bug#59678: [PATCH] sh-script: use completion-table-with-cache to improve performance yikai
2022-12-01 15:46 ` Eli Zaretskii
2022-12-01 20:30   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-12-02 13:45     ` Eli Zaretskii
2022-12-02 17:01     ` Yikai Zhao
2022-12-02 13:44 ` Eli Zaretskii
2022-12-02 17:00   ` Yikai Zhao

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

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

  git send-email \
    --in-reply-to=jwvbkoman0a.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=59678@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yikai@z1k.dev \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.