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: Thu, 17 Jun 2021 22:29:22 +0100 Message-ID: <871r90b2od.fsf@gmail.com> 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> <33224e9c-2185-29c0-5aa9-f798b2f3ccaf@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="18034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) 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 Thu Jun 17 23:30:18 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 1ltzab-0004Wc-CP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 23:30:17 +0200 Original-Received: from localhost ([::1]:36386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltzaa-0001qC-BE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Jun 2021 17:30:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltzaM-0001pp-Ml for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 17:30:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltzaM-0000Ng-EW for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 17:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltzaM-0000ii-74 for bug-gnu-emacs@gnu.org; Thu, 17 Jun 2021 17:30: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: Thu, 17 Jun 2021 21:30: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.16239653752715 (code B ref 48841); Thu, 17 Jun 2021 21:30:02 +0000 Original-Received: (at 48841) by debbugs.gnu.org; 17 Jun 2021 21:29:35 +0000 Original-Received: from localhost ([127.0.0.1]:55285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltzZv-0000hj-0i for submit@debbugs.gnu.org; Thu, 17 Jun 2021 17:29:35 -0400 Original-Received: from mail-wr1-f49.google.com ([209.85.221.49]:42975) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltzZq-0000hT-Bq for 48841@debbugs.gnu.org; Thu, 17 Jun 2021 17:29:33 -0400 Original-Received: by mail-wr1-f49.google.com with SMTP id c5so8300377wrq.9 for <48841@debbugs.gnu.org>; Thu, 17 Jun 2021 14:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=kZyrr5n5gjeW2bqoqY3eiyN26tcb8zyAgKhDvy/MxNc=; b=U/XRyZk3udRfBYyT2Qkf4qOaHRmXQOdoWpEU6fBbgoU04AQ/J1mBuGAO1mDunO0+b4 dRTSr5inuJOu1m0R+eZbb+89vDSgEOHfOsWInl+7uxjXdl/PPgJLKGdnm7p/CZxZoTWV +4Jf23UTEXqYBh3U5s+z0Egste0AmUMwF4UNOPiMfRFmP+92GXPvFM4NzPpLJTywFwZv F2g8pSYpvImWyAjFsScNVQ+H7Un8u6aefBgcMDCg34BHEtIyDQAAk0RbUNS4DT4Dx0lZ 0BiQD+/K9uIaJPX75TDwPcaLxWPJvtXTuOxv4QUqrIlpdBw9kT62Til3bmzrj8oRRBAf 7vEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=kZyrr5n5gjeW2bqoqY3eiyN26tcb8zyAgKhDvy/MxNc=; b=hHuKzdS3PH7EyvtaQq0dyD6eqoNJSIWnhtD2CVS/VozaJUpK1YG2n9EA+i3e1Ts1ss LkuLdfktQcogl36sD/wC9i4v1cFnhgcMRLg+EAiD4n0fwkrhdE4bUZelNRqO0gbvs3wG 4Lax2TIyGYDfqdpsmJAyj3ifqLzSD6maS5C0B6sOQHoHXDR3rgxgKtBYi7cjzmYSrAz2 apznS/P0NHEJGPoNJ0mxn9bEVvIZ19fc/+H/949YOTrEEvNb/5LZl0Sgmvwo8hk7vp69 yuWGA0TRgpCkz3tZK9UwK5Uvg834EIcBbgD839QMxHc+i0CtAKGvSA+bjTAgRiWw8Nkj PIVQ== X-Gm-Message-State: AOAM530Phf23VTAgKaPxuu+Y7oiSJapdlks9XpxhUEYti+BQrOZbjXAe gP+5luLYJtZ5KGXkzjh6hZT7nxztvWo= X-Google-Smtp-Source: ABdhPJxooZnAEWUus8H9eH+4cFQcLUgrAnJS6/H8MA8XVbmxLTyMc8+iONjLpZvg99kT9V/Tyu/MDg== X-Received: by 2002:adf:e54f:: with SMTP id z15mr8343351wrm.141.1623965364149; Thu, 17 Jun 2021 14:29:24 -0700 (PDT) Original-Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id k16sm5730052wmr.42.2021.06.17.14.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 14:29:23 -0700 (PDT) In-Reply-To: <33224e9c-2185-29c0-5aa9-f798b2f3ccaf@yandex.ru> (Dmitry Gutov's message of "Thu, 17 Jun 2021 05:23:53 +0300") 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:208680 Archived-At: Dmitry Gutov writes: > On 14.06.2021 03:16, Jo=C3=A3o T=C3=A1vora wrote: >>> Perhaps predicate it on the value of icomplete-hide-common-prefix inste= ad? >>> >>> 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. > > So... it's a bit more complex than that. Yes, my batch broke the things you mentioned. > It seems there are two ways to proceed from here: > > - Just alter the printing logic in the "single match" case to print > the match text in full is it's not equal to the input string. I > haven't puzzled out the logic doing that yet. >=20=20=20 > - Try to keep the current behavior while avoiding the duplicate work. Both sound absolutely fine to me. > About the latter option: the result of that most-try stuff is only > useful when there is only one match, right? No idea, but may be. > Unless I'm missing something and the value does see some use in the > multiple-matches situations, the patch below both keeps the current > behavior and gives the same performance improvement: That'd be fantastic, but I doubt you'd be keeping the exact same behaviour. I never understood it -- that's the thing here -- but I think that completion-try-completion is doing more stuff when multiple candidates matched by a pattern happen to share the same prefix or suffix or something like that. I might be completely wrong, tho. But really if you make this patch conditional to fido-mode or that other var that you think is more abstract, I think it's fine and it's a very clear win. I really doubt that the tiny number of fido-mode users care about that behaviour anyway, but I'm sure they'll appreciate the considerable speedup. Jo=C3=A3o