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: Wed, 8 Nov 2023 03:06:48 +0200 Message-ID: <7d9704c0-6848-f8f1-5126-232175936ff0@gutov.dev> References: <877cnafv39.fsf@gmail.com> <9447dde3-b8e7-2ec0-9a9c-72c4cf9d12a8@gutov.dev> <7d14bc13-4419-816c-5708-c42988c39c02@gutov.dev> <5d0a78cc-4fa0-ef04-3462-1826f17d7d56@gutov.dev> <877cn8asud.fsf@gmail.com> <8734xtauqj.fsf@gmail.com> <5181f95e-61e7-c8c4-6389-44ee57e0c749@gutov.dev> <31cadbfd-d086-a04f-0ed9-17ce70b4282c@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="15457"; 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 Wed Nov 08 02:07:36 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 1r0X2c-0003ln-Kc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Nov 2023 02:07:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0X2U-00005Q-3g; Tue, 07 Nov 2023 20:07:26 -0500 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 1r0X2S-00005G-K8 for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 20:07:24 -0500 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 1r0X2S-00088I-7L for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 20:07:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0X34-0006J0-DP for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 20:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Nov 2023 01:08:02 +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.169940567524223 (code B ref 47711); Wed, 08 Nov 2023 01:08:02 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 8 Nov 2023 01:07:55 +0000 Original-Received: from localhost ([127.0.0.1]:43787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0X2w-0006Ic-So for submit@debbugs.gnu.org; Tue, 07 Nov 2023 20:07:55 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0X2g-0006I8-HX for 47711@debbugs.gnu.org; Tue, 07 Nov 2023 20:07:53 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1D1C45C02CB; Tue, 7 Nov 2023 20:06:55 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 07 Nov 2023 20:06:55 -0500 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= 1699405615; x=1699492015; bh=GhgIKDVhvGdhLagxgdTJrm83LsRPKjuxtug 2cKhMMg8=; b=Ty5GNyeGeSTYPnYWWxfArmrbLV3/GxfssfqR3VcT0r2Ds5seN3C ZSTUpi0XkRXWHFmNvA0Tkf45hBC8ytsGA4rt677QMf1bEYErtEgfOYxa4wzk/h5X RymEsf8S9v3FGSsyVdwRl+vWJ54jAgzb1xOM/h7MQ3cH0y7a1mHP9ZY49wrohpP1 9z09kaBfZ5DJhpYk2B2MxB9a+e2WetLF5T3p5NbK1f6vfXEiHnPAxgHacjsflZF9 z0AiyI63cRYFzLt87tssUxbJpu5ZwToOOlurdjF4xPp5Mm5g/T/tbcsba2DapiRk 7NYhvwW4wjG3EgasWCHX5Pp52YzJ3BI/RZg== 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= 1699405615; x=1699492015; bh=GhgIKDVhvGdhLagxgdTJrm83LsRPKjuxtug 2cKhMMg8=; b=XpGGEbPxOeZiywq1Zs9b3DPxIaWrS/EOGerxM/+4MVA0k1PgzcO avj8YVXps6/0IQW4n/R0TkzuRcraj1SoxXWci2eYw8FLyWnTHOoLEtAEkB9oTPme erBiXUIb3/tOJ7pK1OuZRH1+/mdabIBfWj487QJYWTVqqQZ5Q0N5qyz3OVELHgdF G3EEx5Mkg8LpynOFlt/P1wmWAJ9r6J0+t3Id2H3Jq81leb45Wg4EeFSH7tlPx4QD D5WytukRGx7JrjfvOpSQZSq9UVgwpW0kmFvG7CAVibDZC+uYfko/1+nexemB1Klm E1HM++csnSEPjgi64kqJYO9tTMdlLzC98uw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddukedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Nov 2023 20:06:51 -0500 (EST) 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:273957 Archived-At: On 07/11/2023 14:13, João Távora wrote: > Any objections? Seems to speed it up when flex is the preferred > completion style outside icomplete. These are average times > collected from the instrumentation of the above > completion-all-completions when doing a M-: (setq i TAB) > > I just used my normal Emacs session for this. > > with lazy hilit: 0.104536125 > without lazy hilit: 0.172522571 IIUC the problem with the default completion-at-point UI here is that is prints all completions anyway, in the buffer *Completions*. And so it applies syntax highlighting to them as well, and does that eagerly (as opposed to e.g. doing that via jit-lock). If you instrumented only the 'completion-all-completions' call, then that might miss the subsequent time spent in sorting. But speaking of the case when the *Completions* buffer isn't shown yet, the code calls something similar to completion-try-completion, which ultimately goes through completion-pcm--find-all-completions. Does it currently apply faces too (in the default, non-lazy scenario)?