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: Sun, 06 Jun 2021 00:20:28 +0100 Message-ID: <87a6o3x5j7.fsf@gmail.com> References: <87eedgy7pt.fsf@gmail.com> <1f659c88-4d9d-8fc9-733a-5e6068f9ed4a@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="4440"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 48841@debbugs.gnu.org To: Dmitry Gutov , monnier@iro.umontreal.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 06 01:21:10 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 1lpfbK-0000wQ-5x for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Jun 2021 01:21:10 +0200 Original-Received: from localhost ([::1]:48904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpfbI-00068a-IZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Jun 2021 19:21:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpfbC-00068C-Bt for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 19:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpfbC-0007AQ-5D for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 19:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lpfbB-0003iF-Tc for bug-gnu-emacs@gnu.org; Sat, 05 Jun 2021 19:21:01 -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: Sat, 05 Jun 2021 23:21:01 +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.162293524014224 (code B ref 48841); Sat, 05 Jun 2021 23:21:01 +0000 Original-Received: (at 48841) by debbugs.gnu.org; 5 Jun 2021 23:20:40 +0000 Original-Received: from localhost ([127.0.0.1]:50278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpfap-0003hM-QK for submit@debbugs.gnu.org; Sat, 05 Jun 2021 19:20:40 -0400 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:53015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lpfan-0003h8-Hf for 48841@debbugs.gnu.org; Sat, 05 Jun 2021 19:20:38 -0400 Original-Received: by mail-wm1-f52.google.com with SMTP id f17so7550014wmf.2 for <48841@debbugs.gnu.org>; Sat, 05 Jun 2021 16:20:37 -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=0SsC1OOXrvTZ7RCsaUmvBieks2UWV7DPo25x5rKzOcE=; b=DFLixvh5f+fcfVieEtE8GF+YVfVQKFRptRpTcONCU+uLyfr4wFvv1a61eNlFi4SW+6 5YPRvs61hyvjdmEV8fg+6zfErHO3B6+RKyfYkl/YU6orCWb3GXrlxpmOM+Z97p0JpZA+ js99W55jQaUrrU2wU5ACa9pgvTYCstVrnJcxg1FEUd83grFGQcLIujgnZEXT09gV5Ycr mX9Og//Oi5/HAT6EWWP1efDXykLTdz0BYU1UMqMcfZTAkLMCJvOuCkuDe81ccIJMLvvi 8zuhodxXb3OzQ/0dngm/7UkS+vOwb7i5zKyU6XJKccqXy/DMEm8eKtngIVAnu05EvgMx IqVw== 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=0SsC1OOXrvTZ7RCsaUmvBieks2UWV7DPo25x5rKzOcE=; b=VUeG4UXqZIE8dxOMr9xET7quA1IqOX2CHwjV9H6f8F7Q4pcc4JxqtaoXXqbnoFL/Ax HeGE+sTulS3rhv6yDfmWfqfj6UneDhhAMoBh5S2gEHk+cPY3PBI0YeCSiX8PkZuMaXIu jh3DxoqOxQc3ekL7G34F25tXaHXJeNaL2mt92hk/JwNU34KoW9kZabUdnOwNtJEFuyMd W9NiTNgqRYSHUhoSDCOHcCPNLbMFOjZpKP8E314Vkpw78WdsW0walZl3umyKEd0p52ov WRhA6JwB4DBBmXxeR4VlaGiUO/VMN/x8XGUSkGkZ3MK2zlQ9agLSFttjktcjVMnpPU/6 lm8w== X-Gm-Message-State: AOAM530qJWgKezzWFYiu6Qx6GY8kkPp0laGaWyzLj8ZjmIKPtclgfiu6 hUJc6snBmpqH8xc8NH9gnhebMBKFnT8= X-Google-Smtp-Source: ABdhPJw55fhtCielN9mVkgNpmg950Hy3yE07XM/cG3Y0weNe3lBCikLBzApWvv2t51NMoaJjJlHSow== X-Received: by 2002:a7b:c935:: with SMTP id h21mr9886969wml.183.1622935231304; Sat, 05 Jun 2021 16:20:31 -0700 (PDT) Original-Received: from krug ([89.180.147.196]) by smtp.gmail.com with ESMTPSA id m65sm9698039wmm.19.2021.06.05.16.20.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Jun 2021 16:20:30 -0700 (PDT) In-Reply-To: <1f659c88-4d9d-8fc9-733a-5e6068f9ed4a@yandex.ru> (Dmitry Gutov's message of "Sun, 6 Jun 2021 02:02:24 +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:208078 Archived-At: Dmitry Gutov writes: > On 05.06.2021 12:35, Jo=C3=A3o T=C3=A1vora wrote: >> Thanks for the report. Before I try reproducing, can you try with >> fido-vertical-mode and tell us it if that changes anything? I think I >> remember that skipping some suffix-calculation logic saved on a few >> traversals of the big list of symbol completions. > > Why, yes it is. fido-vertical-mode is definitely snappier with such > settings. > > Maybe still not on the level of ido-mode, but at least halfway there, > compared to the "horizontal" version. Yes, that is also my assessment after trying your recipe. fido-mode + fido-vertical-mode is not quite as snappy as ido-ubiquitous-mode, but decently close. My bet is that the remaining lag is due to sorting. In a dumb but illustrative example, when given the pattern 'fmcro' flex-enabled ido-mode pops 'flymake--backend-state-p--cmacro' to the top, while fido mode selects the much more reasonable 'defmacro'. Now, what I called here the "suffix-calculation logic" is what I also called the "[mplete] dance" back in the emacs-devel thread. Truth is, it's always annoyed me in icomplete partially because I don't understand what it does exactly and how it is supposed to help me. I suppose Stefan knows best here. Regardless of its use, it seems to require another try-completion call in all the filtered candidates (which might be very big) so that's probably where the extra lag comes from. So, in summary, to speed this up for whomever is _not_ using fido-vertical-mode, either we manage to speed up that part of icomplete.el, or we get rid of it completely (at least for fido-mode). For reference, it lives in an "else" branch of one of the "if"s in icomplete-completions. Jo=C3=A3o