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: complexity in minibuffer Date: Wed, 2 Jun 2021 16:37:16 +0100 Message-ID: References: <878s3zuq47.fsf@gmail.com> <09f2a253-84ba-5cfd-552e-0b89109864a5@daniel-mendler.de> <875yyxaoxp.fsf@gmail.com> <871r9laj6a.fsf@gmail.com> <1b73a130-204c-76fb-2b60-02b814aee0f0@daniel-mendler.de> <87r1hl8xom.fsf@gmail.com> <878s3t8tzw.fsf@gmail.com> <3c68bd00-70ca-fa18-f9b8-cd03029f9294@daniel-mendler.de> <8735u18lsd.fsf@gmail.com> <8e33bbfe-0015-b85c-b57c-ba448f2e6215@yandex.ru> <3d519805-f602-fa52-ec69-0506bb6cb568@yandex.ru> <45be3e2f-82f6-087c-bfd8-5926a395d198@yandex.ru> 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="16248"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Juri Linkov , Stefan Monnier , "emacs-devel@gnu.org" To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 02 17:38:29 2021 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 1loSwu-00044x-I6 for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 17:38:28 +0200 Original-Received: from localhost ([::1]:44558 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loSwt-0005Qu-BA for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 11:38:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loSw0-0004Iu-BT for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:37:32 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:46065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loSvy-00026L-CW for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:37:32 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id mq2-20020a17090b3802b0290162428291f5so2006593pjb.4 for ; Wed, 02 Jun 2021 08:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=BcoPRaLUf7FY3l24bjKryp8NU3kcLeEhk47rhW/kNd4=; b=f+OJF7GlIf5tA/qcWZ01aYq4vCTB0IG0EvFt9HfVhAUavOP/Wh7FB64pvRowTaXtL6 1/FEIqK3TV+GP5VaLvas7x1/LjEPHoobxSyFvKAJF6W9dHqwukDUMJ3lqGl6JKyF1knA VeCqg1gFRnvh0XKHzn0FqWrOk52O9YsoCgMpHD2pSH716tAqjNVDlgVEPGL+qOBNzxKY KhtrhFcmPhEa/ZvHVK8YghF61H26HhUzz46hZsZpmiffQEZ6ZgWvfKOa8GB9SI+hU+Vw cF4Isa6aJ8daBAawvHud50J7pZUjn1UcPfwbd9hOZ7LfaLqmDiLWOAa8GQY8kXZTF0+t DjzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=BcoPRaLUf7FY3l24bjKryp8NU3kcLeEhk47rhW/kNd4=; b=ZRczLKTUCyHvixa7batS5P7PY1s09SqjN4ZrnSWKrXRuHNfFnGy1PfdtKbivxI2DCO HCnXYyqYLV+8DdUmYr7F0ccLHXtlsdpDlvxFzISxi1lc/zJ6gIFjXCYW3qkF7GuifPmA Eg7aIhcVEDTZXTfRNxEM7x81bR3+bPK3G88IA5DavfO/rTz+kpVzLKDfAX6hTXP2JUZf fCFdmxLqj9LeVzT37cgcn6takOY+RClTVl+I8MuN+SVrqmoAuZ6kxJwtPRF4gNt4Ye5k C0HiRSHXDvIMRygMPKuMf1NmEbLSJIFwREWYic9+Y3s4u1xDlKQF2DH0TylSMDzrA9PM jetQ== X-Gm-Message-State: AOAM532RwQDoSe94raWEaRIFEhDzf+nhscQLsHZDVADo924odnuE09Uc y+HSXmuJAD8KlFK321t3KjpDrqyWwe1VhGYupHM= X-Google-Smtp-Source: ABdhPJxLShQmKVN7lk4iVZrvipzugeXECQJr2ju8Acu5D0KiyQAVj4tQwTXQSEvdCj8HL2oZut7SbixFm1fU6E+/Md0= X-Received: by 2002:a17:90a:aa94:: with SMTP id l20mr6147450pjq.125.1622648248515; Wed, 02 Jun 2021 08:37:28 -0700 (PDT) In-Reply-To: <45be3e2f-82f6-087c-bfd8-5926a395d198@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=joaotavora@gmail.com; helo=mail-pj1-x102b.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, 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.23 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" Xref: news.gmane.io gmane.emacs.devel:270305 Archived-At: On Wed, Jun 2, 2021 at 4:29 PM Dmitry Gutov wrote: > > On 02.06.2021 18:20, Jo=C3=A3o T=C3=A1vora wrote: > > By that time, you have already traversed the completion list many times= . > > What's the problem with having the completions themselves contain > > all that's needed to render them? > > In any of those "many times", did you already know which completions > will be displayed, and which will not? > > Some transformations will be more costly than others (even if the > current examples are pretty fast), so we shouldn't call them unless we > know a given completion will be displayed. You're again misunderstanding my suggestion, and bringing up the same concern, which I've already answered. Let me try again. Call the total group of completions A. Invoke the group func for every c in A, yes. _Don'_t transform every completion until you know which ones to display, call this group D. Instead allocate a transform function and attach it to each c in A. Then call this transform for each c in D. Currently, one calls group func for every c in A, to get the group only. Then one calls it again for c in D to get the group again (call this invocation X) and finally call it again for c in D to get the transformation. My suggestion can also scrap the double invocation X (getting the group may be expensive, for some backends). Jo=C3=A3o