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: [PATCH] Make fido-mode about as fast as ido-mode even with many completions Date: Wed, 25 Aug 2021 16:42:54 +0100 Message-ID: <874kbda5tt.fsf@gmail.com> References: <3d3f894f-a6fa-53ae-5d50-c3aa9bffc73e@daniel-mendler.de> <56ab18b1-4348-9b2c-85bb-af9b76cd429a@daniel-mendler.de> <38a06f3c-4a7a-755c-c99b-708f91afabfa@daniel-mendler.de> <9f59f87c-2489-aaa0-5b3f-0e911b7ffa6c@daniel-mendler.de> <8a36e61a-1c5b-bf3b-a454-077348589c4f@yandex.ru> <87y29471ov.fsf@gmail.com> <87sfzaimng.fsf_-_@gmail.com> 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="21065"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , Stefan Monnier , 48841-done@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 25 17:44: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 1mIv4V-0005LA-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 17:44:11 +0200 Original-Received: from localhost ([::1]:40322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mIv4T-000864-Vb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 25 Aug 2021 11:44:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mIv4M-00084z-Fs for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 11:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mIv4M-0000KS-7t for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 11:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mIv4M-000187-5x for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2021 11:44:02 -0400 Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2021 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 48841 X-GNU-PR-Package: emacs Mail-Followup-To: 48841@debbugs.gnu.org, joaotavora@gmail.com, dgutov@yandex.ru Original-Received: via spool by 48841-done@debbugs.gnu.org id=D48841.16299061874270 (code D ref 48841); Wed, 25 Aug 2021 15:44:02 +0000 Original-Received: (at 48841-done) by debbugs.gnu.org; 25 Aug 2021 15:43:07 +0000 Original-Received: from localhost ([127.0.0.1]:47383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIv3T-00016o-EJ for submit@debbugs.gnu.org; Wed, 25 Aug 2021 11:43:07 -0400 Original-Received: from mail-wm1-f49.google.com ([209.85.128.49]:46053) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mIv3P-00016F-Rr for 48841-done@debbugs.gnu.org; Wed, 25 Aug 2021 11:43:05 -0400 Original-Received: by mail-wm1-f49.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so71999wms.4 for <48841-done@debbugs.gnu.org>; Wed, 25 Aug 2021 08:43:03 -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=yD7B/XLdbwNkEeJkA7mN+GGToapeQO8Y0dGhHrB6Fko=; b=is8Puqlg3DJMBCsqPd5qtC+1GdGcTboFkrwKYo1fuFOn1nKrxh83zuTHu70o+picrF +Ejftp7TiS+HocNqlLGnxTZqR80saQBO/+ps+OIbjiraGE9UbzIte/MX5JBx8DufW47e qtb5yRJwKcmCcMMZIYF1cs/u06Zg57ZXQwzFfdZ+xgogUn/M3i7n5Yo3vcyA9++/AOv7 piffiPbpGu9jbop2tg8FljvNhtPaSQ3+suHG8nMiHnc53/GkiRHwxPd+nFqDxST4NdPg 8pQybEZvv3SnbH0W4DGFXRoyOf0SkWvhTEH6pPGbosmVQbcmXqpH6A81A8CIiRsBVnkr U6Ng== 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=yD7B/XLdbwNkEeJkA7mN+GGToapeQO8Y0dGhHrB6Fko=; b=czr+88y0WbKd4VaHKhPpocwln6ySo22q36JxMZ9beX3RTiq5mhFGDlpZ1a+0aZcklP iNqmmIzszqm52TpHQ0n8PzXiF/ZlxonTEQbnQpma4dxpp6qlJ4HDOcNmDdALRjkcNFCd onja5uZv/MUeJYemFrkYI1eL+kGhLjuhifaJ1UU+OKVhJthqLb3J2nAw7JZxaq4mQT77 LkpMSHepDSh2DlBQeI7CRw7hv/FeiydvUnicB/OQTMDSWvVVoteIivklVyHl4mVVFoX4 hvhFJo3lZGd1nRHHu0TY33DvesIN6DeqzvWq+XkEdzJsTaOrSKttqDGCZmQsnH+mAIDP U+bg== X-Gm-Message-State: AOAM531dDpOFBVJ2TiH5jK3pjEtraclfc6tPAwCKtutIxs8srxCkTwwO 9boCgjE3chqKh9AXaBtZ5rs= X-Google-Smtp-Source: ABdhPJw0lq4PVNV/rczK25KIbQ2vPpVe6yH8VHIsgR0B9YViEB29TLQFOSjz54A/kZcX5X3iFgJfuQ== X-Received: by 2002:a1c:7402:: with SMTP id p2mr9994769wmc.111.1629906177862; Wed, 25 Aug 2021 08:42:57 -0700 (PDT) Original-Received: from krug (a83-132-128-184.cpe.netcabo.pt. [83.132.128.184]) by smtp.gmail.com with ESMTPSA id b15sm311647wru.1.2021.08.25.08.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 08:42:57 -0700 (PDT) In-Reply-To: <87sfzaimng.fsf_-_@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sun, 15 Aug 2021 19:32:51 +0100") 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:212648 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > [I've removed bug#47711 from the list, since I haven't read the bug. > This is only directly concerned with this report bug#48841 about speed > differences between fido-mode and ido-mode.] > > Jo=C3=A3o T=C3=A1vora writes: > >> scratch/icomplete-lazy-highlight-attempt-2, although still incomplete, >> is one such approach, though it still sets `completion-score` on the >> "shared" string, used later for sorting. But also that could be >> prevented (again, only if it turns out to be actually problematic >> IMO). > > I have tested the patch more thoroughly now, and have not found any > problems. As I wait for genuine reports or explanations of the much dramatized problems in the above patch, I've pushed a much simpler patch that has a dramatic beneficial effect: simply don't do any copying, highlighting or scoring if the pcm-style pattern (used by the styles 'flex', 'substring' and others) is empty. This more than halves the waiting time for the candidate display when the pattern is empty. As far as i can tell, `fido-mode` is now faster than `ido-mode` and so I'm marking this bug closed. Of course, when there is a pattern of a single character or more, the icomplete waiting times using my earlier 'completion-lazy-highlight' patch are still around 70% of the current master. But those times are always quite shorter than the empty-pattern case. I'll wait a bit for the alternatives presumably being worked on before pushing that or something based on it. Jo=C3=A3o