From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: scratch/backend-completion aaaa016056 2/2: Speed it up Date: Sat, 3 Dec 2022 23:30:37 +0000 Message-ID: References: <167007345844.23701.8454474119701440468@vcs2.savannah.gnu.org> <20221203131739.3FCF9C004BE@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000022c16305eef4d893" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12266"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 04 00:31:27 2022 Return-path: Envelope-to: ged-emacs-devel@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 1p1byg-00033x-JO for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Dec 2022 00:31:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1byA-0006l8-5v; Sat, 03 Dec 2022 18:30:54 -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 1p1by8-0006ku-Fx for emacs-devel@gnu.org; Sat, 03 Dec 2022 18:30:52 -0500 Original-Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1by6-0003hm-Ub for emacs-devel@gnu.org; Sat, 03 Dec 2022 18:30:52 -0500 Original-Received: by mail-oi1-x22b.google.com with SMTP id m204so9087824oib.6 for ; Sat, 03 Dec 2022 15:30:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HNKne3kJ1JeARBjqrjffPgrf3N66gi5YtjA4RQIQy+Y=; b=Cv30IUZeWhsKFzHmImz9dcyamfuMzkax5/5IphqbrHQbeFKD/t3A/v4S6XhAcNrQN5 VsfWJsVhGcdDFtGe+LpobaPzs5csNfWt/ilJ23yUuTExZXlMhqnxksYrAw5EikgmOypk s0jahf0SFyyvjKtpttoh53bp2NwS2sD5ZR89wva4yg026cNW95EhEHtPV6Ja3/n4/vj8 BZ6fpKnv6t7qAxseEtjwuWCTLxrDyzmGuaMhYrobemqT3lnQVUVK2fGjTIUNyKALl/U3 85vhnMj5mof6HCsLBczdw+M+xHCfgfpmKpmwyxpNtwyaoBF7Ge36R1ZrtXgOyOijNhXf 6snA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=HNKne3kJ1JeARBjqrjffPgrf3N66gi5YtjA4RQIQy+Y=; b=qxGB//XQSoKXqXw4dFS5PpYjYMQQOCSVTaeGiVJevEmrfZttCZNbTf6afc+G/umikX ovUP3RCfRzqjXluBbdunAjktRhJcFygeSgh/Gm0pBV5X/9ET+sluCYV4Yem4X0nnr7P/ uCbvtkQuMIPi7OVVfkPwd6QGQDglVgdHPjtemuxvR1OgyPdS5a5yS++eEmNwV3L8N8Go gND0dnswpIt3/f3ut3YhswfFREOIVK0dpMqcRvGgZPXpj0z9bz3PVUfq/PuEPSZL0T/u +75YwnVRBr2vuJGEzdDSAS9lM03Tk+Ng+I6jE3lKXPK6bax3/U0p5vBDDSx+5NGP9EC1 ZhUg== X-Gm-Message-State: ANoB5plkTPS4QHk3erPa22Gl4rL3avf8sFy9UN8UFN6VI5IQD3hY0s6I oMdvahW7HAC8ngRrlJIopyZcSEKZQJfHOncThpg= X-Google-Smtp-Source: AA0mqf4wVc63sTmXQVNjweSZblbienSgsONeJyTKqxbM3kWglbQVtOenFoyAvmQtXzlUs6BfZTR1/5oWzE1EZhVrj7c= X-Received: by 2002:aca:240f:0:b0:35b:f808:d8e7 with SMTP id n15-20020aca240f000000b0035bf808d8e7mr3161865oic.215.1670110249139; Sat, 03 Dec 2022 15:30:49 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300880 Archived-At: --00000000000022c16305eef4d893 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > But I'm surprised it made things slow: this code should only be involved > when the user choose some *other* completion style, so could you check > which method of the completion table was invoked? It seems to be called with both `nil` and `lambda`. I've added this to the FIXME comment. It made things slow because when selecting a candidate with fido-vertical-mode it did another useless 0.5s/1s lookup for the thing I had just selected. > Maybe we should only use that code when `action` is one of `t` or `nil`? Maybe. Anyway in my tests it's working fine without it. But `nil` doesn't break them, so I'm fine if you add them. I'm just confused about the possible benefits that may come from that complexity. I wish you could post an illustrative example with some strings that a mere mortal might follow along. Jo=C3=A3o --00000000000022c16305eef4d893 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> But I'm surprised it made things slow: this code = should only be involved
> when the user choose some *other* completio= n style, so could you check
> which method of the completion table wa= s invoked?

It seems to be called with both `nil` an= d `lambda`. I've added this to the
FIXME comment.
<= br>
It made things slow because when selecting a candidate with= =C2=A0
fido-vertical-mode it did another useless 0.5s/1s lookup f= or the thing=C2=A0
I had just selected.=C2=A0=C2=A0
> Maybe we should only use that code when `action` is one of `t` or `ni= l`?

Maybe.=C2=A0 Anyway in my tests it's working fine= without it.=C2=A0 But `nil` doesn't=C2=A0
break them, so I&#= 39;m fine if you add them.=C2=A0 I'm just confused about the=C2=A0
possible=C2=A0benefits=C2=A0that=C2=A0may=C2=A0come from that complex= ity.=C2=A0 I wish you could
post an illustrative example with som= e strings that a mere mortal might
follow along.

Jo= =C3=A3o
--00000000000022c16305eef4d893--