From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#47711: bug#48841: bug#47711: bug#48841: bug#47711: [PATCH VERSION 2] Add new `completion-filter-completions` API and deferred highlighting Date: Fri, 27 Oct 2023 03:11:46 +0300 Message-ID: <7d14bc13-4419-816c-5708-c42988c39c02@gutov.dev> References: <3d3f894f-a6fa-53ae-5d50-c3aa9bffc73e@daniel-mendler.de> <56ab18b1-4348-9b2c-85bb-af9b76cd429a@daniel-mendler.de> <328f87eb-6474-1442-e1ca-9ae8deb2a84a@yandex.ru> <83fsvcbio7.fsf@gnu.org> <9f432d18-e70f-54c1-0173-1899fb66d176@gutov.dev> <877cnafv39.fsf@gmail.com> <9447dde3-b8e7-2ec0-9a9c-72c4cf9d12a8@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27503"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Daniel Mendler , Eli Zaretskii , Stefan Monnier , 47711@debbugs.gnu.org To: =?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 Fri Oct 27 02:12:48 2023 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 1qwAT0-0006tV-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 02:12:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwASn-0001nG-4W; Thu, 26 Oct 2023 20:12:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qwASl-0001mz-CE for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:12:31 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qwASl-0007AF-3m for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:12:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwATF-0002zb-UJ for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:13:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Oct 2023 00:13: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.169836555211448 (code B ref 47711); Fri, 27 Oct 2023 00:13:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 27 Oct 2023 00:12:32 +0000 Original-Received: from localhost ([127.0.0.1]:34714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwASl-0002yZ-Hk for submit@debbugs.gnu.org; Thu, 26 Oct 2023 20:12:31 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:43487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwASj-0002yK-1k for 47711@debbugs.gnu.org; Thu, 26 Oct 2023 20:12:29 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 04B513200F81; Thu, 26 Oct 2023 20:11:50 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 26 Oct 2023 20:11:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698365510; x=1698451910; bh=e4ciEwM+d9fKknttNQFwU+jyKKNKmGCJUBd Lt/cGocc=; b=e5oIo8aSy7N6IBab0BneojytWxpHeuS6hhCmqME+44KENVgdEf9 SK7UgG9XKAMPR8dIuP8d/U8+KKymEpZyxGPk8JU+YFM7YJ6WCgRJeBEnVbY2QZDt fN+7CrkbM7f1Tyr9EAIPs5KZLbCwI593Q7KLIHUe9wyZ92sGE61G5kWzUEzHnZzY fc8DI+1HXSq6C5ytFAArw+nfIuiOm/FmQg5HeLLFMkbIv5FXBFop54MWEqcWavTP HePKIYgTd8rmbXh0z19Te1Hdd8sMpvODDUePsslT8WR7cSfc81qPLD0ZCo8b7nl2 jABYtaabiAVHVDjfZG0Fzeoz9Tw/fhA6aeg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698365510; x=1698451910; bh=e4ciEwM+d9fKknttNQFwU+jyKKNKmGCJUBd Lt/cGocc=; b=fYociYSpyPVzhY7UGHGgYuQLT/qgQRj8piapYCEL15E7eYR3D+f cYJ+orD+sn/4wguKtkWJ2wDmeeHgiaRF0uFUXlGqMJN75VYwy88F0acgRTYL+AyT cGoCk1u/ZOl2+/XrmD+Wnu7yOZpcukV14SqfZaetbFZafMBIH9xZa2/bw0rYoYBf 6aK5s+Wbbe8Csg6NkVODF1bvCXCgsXujMV4Xp0bGQDhttwQ58QLJZWNkoPmyE9/c fZB6egw0cXa5VLi1bpqB6LAxDuh149U2LqGsOmuDp3udIiD9BKfeLt8X4Xs8lBgp WrpMW5vzW30atKl8GKynnQ3/twV3biVlkjw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrleefgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpefhffehleejffegffeugefhkeektdffgfehjedvgeejtedtudehueffgffgfeej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Oct 2023 20:11:48 -0400 (EDT) Content-Language: en-US In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273328 Archived-At: On 27/10/2023 02:44, João Távora wrote: >> It is slower in the sorting step, though: mostly due to the extra >> consing created with the alist to-be-sorted, I guess, but also because >> of the repeated string-match call (which, while fast and much faster >> than the match-data call, is still not free). > And is the sorting step not included in the full call to > completion-filter-completions? I don't fully understand how it works. It recomputes all the scores inside the display-sort-function. >> That's how when compared in practice using fido-vertical-mode the >> results were about the same. > But that's what matters right? Pretty much, yes. Except for some potential exotic cases where the UI or the user would want to override the sorting logic. Corfu and Vertico have such capability, but I'm not sure if it's used often. > Also in the last iteration of the "yoyo" fido-vertical-mode test, > results with my latest patch are quite a bit faster. Hmm, your latest (lazy-hilit-2023-v3.diff) improves the (completing-read "" obarray) scenario a lot (over the original two 2023 solutions), but not the the 'C-h v' scenario. I don't have an explanation.