GNU bug report logs -
#59678
[PATCH] sh-script: use completion-table-with-cache to improve performance
Previous Next
Reported by: yikai <at> z1k.dev
Date: Tue, 29 Nov 2022 14:31:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 59678 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: yikai <at> z1k.dev, 59678 <at> debbugs.gnu.org
> Date: Thu, 01 Dec 2022 15:30:04 -0500
>
> >> 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.
Thanks, I therefore installed the changes.
This bug report was last modified 2 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.