From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] `completing-read` - allow history=t, sorting improvements Date: Mon, 19 Apr 2021 17:52:38 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16817"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" To: Daniel Mendler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 19 23:53:28 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 1lYbpf-0004Iu-T0 for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Apr 2021 23:53:27 +0200 Original-Received: from localhost ([::1]:39300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYbpf-0007V8-0a for ged-emacs-devel@m.gmane-mx.org; Mon, 19 Apr 2021 17:53:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYboy-000757-Lu for emacs-devel@gnu.org; Mon, 19 Apr 2021 17:52:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYbow-0008Co-J5 for emacs-devel@gnu.org; Mon, 19 Apr 2021 17:52:44 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 4521B4411AD; Mon, 19 Apr 2021 17:52:41 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C1B9044119B; Mon, 19 Apr 2021 17:52:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1618869159; bh=xAbuCM6OkGZme0CSxPTGdXPPNZAowtUM04GD598VlwU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ROhmAA9dbstwSSCEOcMX3sNJJ5xuNd4oY5fKHrUwrijm2JHNZ+BPs/ojlVScGZbbR Gl7ylWIanFKtJ+YE7WONmryXbHWERsqI16n+DtL/3gc1Zy/oIk8uo7cR92Fc5WXrks LlQEXcZBdSj4HCjIEROxs14DYQ8+IPWOc8v/yzOs/t4vreh/rBXYEZqhsSnt3oVe9h /jfNcTHmX+2B/CqqmYtq3RZr/7m/v2KyfJ4/8Xm/l3wuzQwRP0/IXB2ZSiat2W3Bd+ I0pmIzL2FvzRy9sxACZzd8rt8ee8uQWmA+DbNC2bt4syETeLN6IXWtTu/452s1jqx4 WtdMTa0AnZ2NA== Original-Received: from alfajor (104-222-126-84.cpe.teksavvy.com [104.222.126.84]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 901E712020E; Mon, 19 Apr 2021 17:52:39 -0400 (EDT) In-Reply-To: (Daniel Mendler's message of "Mon, 19 Apr 2021 22:44:18 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:268194 Archived-At: > N is not that large. I want the sorting to be reasonably fast for the the > candidate sets which occur now in Emacs. Yes, but the log N factor in sorting is even much smaller. You can basically treat it as a constant. > But if this get improved, people may throw more candidates at it and > then we will end up again with a threshold. That's the main point, indeed: rather than try to handle larger sets, we want to avoid larger sets. That's why we have `icomplete-show-matches-on-no-input` and `company-minimum-prefix-length` (tho there can be other approaches like pushing the processing of sets to a separate async process). Stefan