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#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 01:26:53 +0100 Message-ID: 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> <7d14bc13-4419-816c-5708-c42988c39c02@gutov.dev> 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="6575"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Eli Zaretskii , Stefan Monnier , 47711@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 27 02:24:57 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 1qwAem-0001Lq-Af for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 27 Oct 2023 02:24:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwAeP-0003Wq-VK; Thu, 26 Oct 2023 20:24: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 1qwAeN-0003WS-5O for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:24: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 1qwAeM-0002Ni-SO for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:24:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qwAer-0003Jy-TJ for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 20:25: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: Fri, 27 Oct 2023 00:25: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.169836628512733 (code B ref 47711); Fri, 27 Oct 2023 00:25:01 +0000 Original-Received: (at 47711) by debbugs.gnu.org; 27 Oct 2023 00:24:45 +0000 Original-Received: from localhost ([127.0.0.1]:34725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwAea-0003JI-W2 for submit@debbugs.gnu.org; Thu, 26 Oct 2023 20:24:45 -0400 Original-Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]:50653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qwAeX-0003J2-KK for 47711@debbugs.gnu.org; Thu, 26 Oct 2023 20:24:43 -0400 Original-Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-507975d34e8so2243108e87.1 for <47711@debbugs.gnu.org>; Thu, 26 Oct 2023 17:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698366244; x=1698971044; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6B+9ct1bOwgGHU53YyqLbL7bySOn4Xu3pXucbt30a+8=; b=S3Fu0+tz03zlTM9erttfyF3/RWYcnUsXv6zjdLe8/c0BPXsVQrfot5z2i/nNQm08So kXUsHWnk3TP8l3EGiqTeBc5OCAIV0lnqOfvTsldlaBD6OkC2tdKDZG+4Fiz+5rwC3ijb +jbRum+52dPqQosqA6xrwzSxJgExmCv4DR+Tb3txp8B2iHBCX5kkm8QlXVQEK/paJ7u/ QHkFnV0asysuiWVdRRMypD/i/9fj9xzUvLSxOfhr2CfJYkBEqqlLmBenTwR78matqw2j 5r0/xsxhN7RFd5HkGQr208btKIpOIfipn/bMX4XG7hi0GIehoSMl9JyC9GWDjBJTTzaz ckCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698366244; x=1698971044; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6B+9ct1bOwgGHU53YyqLbL7bySOn4Xu3pXucbt30a+8=; b=tMzbHFJhbbHUZP33Bid3VquNrrWKZJyP7NsvdqComdwShT0umRyxTiDtYOPSjlHk5C UwFXNj1SWZQF4SfH2hM5zzwLxlrfQBydpKUuxPD1dplx3vAt6cQNl6f5lbQdixHSoRrJ uAikbApj8pzK3yoy+XZwwmN3yM6AubJ5CdXEz6VZ4Uwb9YimEIAk0FKvMDZjPelmAOdb +NJhlt8OQexbfEB6HVXkGOPb7FLnXVC8iyRTZfpaYg5TcGXYkJPFGYjX+cdLjOI901aa qI1PWpaGETxYVwWvCuH9PYuJWDTRaOwrqkqkYc7PbG5BM1blkxcZQgMsUl8Q9iDLpgZM gdLw== X-Gm-Message-State: AOJu0Yxifk9sAB3N3AsfjBaqNN/ONLNWLcIhzkpX8+XW/3iMJFD/XcEn bQNO2JGRR4lLkVKIefvrnuENOE2CsgCnitp14/w= X-Google-Smtp-Source: AGHT+IE0xmovwkUk9atmcHWMmcVNFj6TvFdbBvqBNF9cM2JVc53kO+1Oop1FTUc3y26WKrKDEgCbcFydTy2+CK1QEuo= X-Received: by 2002:a19:ae08:0:b0:507:a58d:24ba with SMTP id f8-20020a19ae08000000b00507a58d24bamr625891lfc.63.1698366244291; Thu, 26 Oct 2023 17:24:04 -0700 (PDT) In-Reply-To: <7d14bc13-4419-816c-5708-c42988c39c02@gutov.dev> 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:273330 Archived-At: On Fri, Oct 27, 2023 at 1:11=E2=80=AFAM Dmitry Gutov wro= te: > > 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. The improvement was due to running string-match only once per completion, if you look at the changes to completion-pcm--all-completions. It could be this code doesn't kick in in the C-h v scenario. Notice that that function already has some optimizations: for example, when the regexp match is performed by all-completions and its use of completion-regexp-alist, there's no way to get the regex match data to compute the score, so it'll have to be postponed to completion-pcm--hilit-commonality as in the v2.diff case. Then again, that doesn't explain why in the C-h v scenario, the regression was fixed precisely by adjust that code that I was conjecturing might not kick in. Anyway, I think it's safer to say that my latest patch is at least as fast, sometimes faster, than the 2023 completion-filter-completions solution. Jo=C3=A3o