From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#48841: fido-mode is slower than ido-mode with similar settings Date: Mon, 14 Jun 2021 01:16:23 +0100 Message-ID: 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> <878s3gugqj.fsf@gmail.com> <87zgvtu9bm.fsf@gmail.com> <033e12e5-86e2-cb0c-ac8b-6753b96fa4b2@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34860"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , 48841@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 14 02:17:15 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 1lsaHx-0008pm-Vb for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Jun 2021 02:17:14 +0200 Original-Received: from localhost ([::1]:33184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsaHx-0008AD-0m for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 20:17:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsaHm-0008A2-QM for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 20:17:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsaHm-00006k-Ix for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 20:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsaHm-0007U4-9U for bug-gnu-emacs@gnu.org; Sun, 13 Jun 2021 20:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Jun 2021 00:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48841 X-GNU-PR-Package: emacs Original-Received: via spool by 48841-submit@debbugs.gnu.org id=B48841.162362980228731 (code B ref 48841); Mon, 14 Jun 2021 00:17:02 +0000 Original-Received: (at 48841) by debbugs.gnu.org; 14 Jun 2021 00:16:42 +0000 Original-Received: from localhost ([127.0.0.1]:44564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsaHS-0007TL-K1 for submit@debbugs.gnu.org; Sun, 13 Jun 2021 20:16:42 -0400 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:55044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsaHQ-0007T7-A9 for 48841@debbugs.gnu.org; Sun, 13 Jun 2021 20:16:41 -0400 Original-Received: by mail-pj1-f41.google.com with SMTP id g24so8728081pji.4 for <48841@debbugs.gnu.org>; Sun, 13 Jun 2021 17:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=e/yaLscUPfQmX08lEvydOCLfeRZsw4reqb/MeMB4q6s=; b=RHqcz8udoh0W+oNmrAOJGERMvqkw+R1ChGWcdUqsnUTejsABF+Uik0ZHBHe82PFGIL V0rtHNDxdovqOmJ2F6xdtf352tgC/ifCwKLqOWF/+ACnEpJHSdwIik7GggWFUIs7kosG jNWs6ehmi6xvPYkMZcxRZJgBj8yd83mkGiZ84uC5DkHP6wp9usFLpSuCzV6Tn/ZGlShU e2COqZs3cr8U3KTxLXXhNeeAzVjBIwSOR43U/sp2Wxe8lPHIB3WgpYRfLb5UhHypvlY6 KRHnXJ3EisMqGj052Fcrg3VB9ziCIcOu63pb+wYCXwXVemiyn/ZwFypMl+T6PHjFpThM vbcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=e/yaLscUPfQmX08lEvydOCLfeRZsw4reqb/MeMB4q6s=; b=Kz80yu4gTn+8osf1XloQ8lUqnCGctuRs7gsyykhe5qFNCNBPTTiav3ZnkWlQNlZ136 2FUw/AcRruCDLCMNMmoNjCwJ0gLbMdCafUsvNJtWzzURrFaq+AhiuZ10hwjRUdS6pkqH goB2Fdd+8TRPn0ByELudzZk30csPXOcH/wzG1ofjBPyN00SO9tBuNV1ZcQCudKNm/gQI CRfQxrNbI7PxB6fQsoPcGzm4J0J/Ds512WCleSuIL5D3NvmE64Z0mXzfBmfSaVyz6yXT 4f1NVKpv43kurzzxhMeHYcKl1RwAG9NYcAhNLX9YMEJjjQYikues+VqrhBXlfVHxyQiS /QiA== X-Gm-Message-State: AOAM5301eDouVCOLEiQpxww7mSdm8YHzFVR0f1JBJZzkrxFqPpOsnzUQ uFS/rZHr8CLKrJUzuiV2wuefhUiAYtoEcU4XJo0= X-Google-Smtp-Source: ABdhPJwdKOnxDBd2frT5pjOIxbeYw9W/CRpz6VCo6XT5s7N6An6+1wXT124UtDq2OnQmCU3nW+uMh02laPTvLJD28VQ= X-Received: by 2002:a17:90a:6e07:: with SMTP id b7mr20302192pjk.7.1623629794574; Sun, 13 Jun 2021 17:16:34 -0700 (PDT) In-Reply-To: <033e12e5-86e2-cb0c-ac8b-6753b96fa4b2@yandex.ru> 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:208467 Archived-At: On Mon, Jun 14, 2021 at 1:08 AM Dmitry Gutov wrote: > Anyway, I was just describing an easier way to benchmark the same effect > (without having to hit the key sequence very quickly). Hope you or > someone else find it useful. Yes. It is useful. I didn't know about benchmark-progn. > > I could > > investigate, but since your measurements confirm the same tendency > > anyway, I think this simple patch is what's needed to close this issue. > > Haven't tested it myself, but it looks like it will almost certainly work= . > > > diff --git a/lisp/icomplete.el b/lisp/icomplete.el > > index 08b4ef2030..5d37f47e7d 100644 > > --- a/lisp/icomplete.el > > +++ b/lisp/icomplete.el > > @@ -859,13 +859,14 @@ icomplete-completions > > (base-size (prog1 (cdr last) > > (if last (setcdr last nil)))) > > (most-try > > - (if (and base-size (> base-size 0)) > > - (completion-try-completion > > - name candidates predicate (length name) md) > > - ;; If the `comps' are 0-based, the result should be > > - ;; the same with `comps'. > > - (completion-try-completion > > - name comps nil (length name) md))) > > + (and (not fido-mode) ; Fido avoids these expensive cal= culations. > > Perhaps predicate it on the value of icomplete-hide-common-prefix instead= ? > > fido-mode sets it to nil, and this way we retain a better level of > abstraction, and better backward compatibility for vanilla > icomplete-mode users. This is a good idea, the level of abstraction. But what is this "common prefix" anyway? Is it the the same as the "determ" thing, or the "[mplete...] dance" as I called it earlier. Shouldn't fido-mode then _hide_ it? I'm confused, but if you're not, go ahead and make that more abstract change instead of relying on fido-mode. > Next step might be switching this var's default value to nil. Also confused, but no objections. Jo=C3=A3o