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:45:46 +0100 Message-ID: References: <8dd915fe-fe67-2a45-67ff-8aaa3e9b9aca@daniel-mendler.de> <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> 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="23846"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , Juri Linkov , "emacs-devel@gnu.org" , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 02 17:47:27 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 1loT5a-0005wb-PJ for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 17:47:26 +0200 Original-Received: from localhost ([::1]:54090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loT5Z-00047u-8R for ged-emacs-devel@m.gmane-mx.org; Wed, 02 Jun 2021 11:47:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loT4G-0003Og-5d for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:46:04 -0400 Original-Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:35831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loT4E-0006pT-G6 for emacs-devel@gnu.org; Wed, 02 Jun 2021 11:46:03 -0400 Original-Received: by mail-pf1-x42d.google.com with SMTP id g18so2521403pfr.2 for ; Wed, 02 Jun 2021 08:45:58 -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=ARQ+YLJVW1ZI7C4GVaQIIGXQzWqMibSK8I/vxZK4bAY=; b=cS5qrNm4254LwAejTlX1NhRZsAWERKCGlVC0B9chJIzrOH/sLL8Pth/Iea8L9kImjo rFc+BykVAt07bHmGe9gIGwC8em7smrk49iGqHf5ceRCWAH3wFEzJzabKgC7cpYHJ7jU1 HDiOB3481kWL9M0K9+BZMsM42UUEUT9tbV09xLn047+BtQOU7+JCa50a56bv4UemlfsS kXVfgbh9MRqswxZ0W6z2XrpRBqfhUYV5ZGTj8Emdoz1ZZHYs10FuogyNoWwtPK+zdG8Y dr4Yv+niKVRxoA58pEtJslpm6zRf5LKh31ZXF6ggAafl+Ky6qd/PlOIEZsHpf5LBxNc5 EBdg== 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=ARQ+YLJVW1ZI7C4GVaQIIGXQzWqMibSK8I/vxZK4bAY=; b=QW3MGz/U+itgo+hF0VsTZ1NQS9XDbGzGng0f9yMdK2z8IW+bI78851m3xN6GAjonmo lm3m53vR6ao45hNYeCtDtnt1CiH0nQb/R1jsCb+4NISWofJ9f0MMJUBWbd2IFolJ2Occ xwj90ezuYYzI9rszs1747Uthvdiq9FjFOY2TDSdI1DRDEjTQr3VgpCIjiaF7qa2UHy8e WYiZVoag0Iv0yC7ZG49MVpFSJMvy9CkEFlF7WkH48ioCA+0+fc9gBTpurTz0asLJdtid 6EgUQT0cwdH1MFPgS4zd+1BtwPk5zDzV8jl9AFG5jLX/npWC6r38iMaCCdyfqk2kMdSm MvDA== X-Gm-Message-State: AOAM530OX+lfflSpM2+g1i6GKJlqG6Au87E1/fbV2F4AuVzFp3UvvpMB OGAFMidBo/uUN0gHZjiGmPM3NNA2XCL56673uJg= X-Google-Smtp-Source: ABdhPJwI0RC8tBSGPkL6N5jwa7PdsUvTVdEiWKTEUcjcC3mrG0/ZTFfUcE3MHfL/dcQlC69vO0qPO+zzHjNCk2FYA7o= X-Received: by 2002:aa7:8c02:0:b029:2e9:c513:1e10 with SMTP id c2-20020aa78c020000b02902e9c5131e10mr6256047pfd.2.1622648757861; Wed, 02 Jun 2021 08:45:57 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=joaotavora@gmail.com; helo=mail-pf1-x42d.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:270307 Archived-At: On Wed, Jun 2, 2021 at 4:38 PM Stefan Monnier wr= ote: > > > 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? > > If you have 10K completions, the time need to compute their rendering > becomes very significant, so we want to only compute the rendering for > those completion which actually reach the glass. Same answer as to Dmitry. Did you miss the fact from a lot of email ago that I'm proposing attaching a function to each completions to be called just-in-time? The only extra cost is the attachment of this function to th= e completion. The benchmarks I did were with 45K completions and showed a small overhead, just for the group-fun calling bit. So likely even more diluted once you consider each completion iteration. > Not necessarily: you could also decide to only group those completions > which are displayed. Hmm, that would be great yes, but as far as I understand grouping changes order so you can't know the second without doing the first. Like sorting. Unless you mean "decide" as in "dramatically changing the semantics of grouping". Jo=C3=A3o