From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.bugs Subject: bug#47711: bug#48841: fido-mode is slower than ido-mode with similar settings Date: Wed, 7 Jul 2021 10:56:05 +0200 Message-ID: <7fc8ce6d-20ba-79ed-56d8-f10be72cddc8@daniel-mendler.de> References: <87eedgy7pt.fsf@gmail.com> <1f659c88-4d9d-8fc9-733a-5e6068f9ed4a@yandex.ru> <87a6o3x5j7.fsf@gmail.com> <87y2bnv5xc.fsf@gmail.com> <35be6652-9c8d-ee21-e9eb-9598ad6777eb@yandex.ru> <858682b2-b8fd-898b-bef3-97dbe5e4debc@yandex.ru> <87mtrwuy4v.fsf@gmail.com> <2234991b-c2e0-81e3-c1ef-b1d94d35a728@yandex.ru> <87v96hu845.fsf@gmail.com> <310ab8d8-2bba-33bb-1aa4-1dc88dcb57d8@yandex.ru> <877disb30s.fsf@gmail.com> <526eeb14-31c2-f414-ec44-192180d59164@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9024"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 48841@debbugs.gnu.org, 47711@debbugs.gnu.org To: Dmitry Gutov , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 07 10:57:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m13Mk-000276-T2 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 10:57:10 +0200 Original-Received: from localhost ([::1]:36770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m13Mj-00018I-F5 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jul 2021 04:57:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m13Mc-00017n-Fd for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 04:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m13Mc-0007ag-83 for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m13Mb-0003fK-Rl for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2021 04:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jul 2021 08:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47711 X-GNU-PR-Package: emacs Original-Received: via spool by 47711-submit@debbugs.gnu.org id=B47711.162564817714031 (code B ref 47711); Wed, 07 Jul 2021 08:57:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 7 Jul 2021 08:56:17 +0000 Original-Received: from localhost ([127.0.0.1]:50828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Ls-0003eE-Ph for submit@debbugs.gnu.org; Wed, 07 Jul 2021 04:56:16 -0400 Original-Received: from server.qxqx.de ([178.63.65.180]:47469 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Lq-0003dw-Aq; Wed, 07 Jul 2021 04:56:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=o3u4a1/ZU7W8pFLoHziFDm4XIG8WTn7yTgWzxLbAWns=; b=gK3nxdsmphgKTeETBcWmUA4Qo4 RXioGPDTTt2+6BBibZiNXl6TkIjZzWODFkUe4nCHqnjBNe/RTTOf4gv21nCSPj+CVPUOx3IDvkJd/ MRQUXLGIzxJLD9wS5GLJQI1sU87P9dSvztcdan9oTMWD+M8HvgMeDm+MEwY3McP+gD5s=; In-Reply-To: <526eeb14-31c2-f414-ec44-192180d59164@yandex.ru> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209580 Archived-At: On 7/4/21 3:53 AM, Dmitry Gutov wrote: >> - icomplete.el? for fido-mode & friends >> - minibuffer.el, for the *Completions* buffer >> - company.el >> - Any notable others? > > corfu, consult, etc? Probably Ivy too. All of these are in GNU ELPA. > > BTW, I think Daniel had some ideas about applying the face property > lazily as well. I can't find the particular discussion now, but perhaps > he can add to this discussion as well. Yes, Vertico and Corfu apply highlighting lazily. This leads to significant performance wins. See `vertico--all-completions` in https://github.com/minad/vertico/blob/main/vertico.el#L243-L279 and bug#47711. The technique I am using in Vertico and Corfu retains backward compatibility, such that the strings are returned unmodified by the completion style. Highlighting is applied lazily by copying the candidate strings and mutating the copies. For now I am relying on advices. One could add an optional argument (or dynamically bound variable) to completion styles which tell the completion style to opt out of copying the candidates and the highlighting. Daniel