From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 55ec674: * lisp/multifile.el: New file, extracted from etags.el Date: Fri, 28 Dec 2018 05:45:49 +0200 Message-ID: References: <20180922154639.23195.66360@vcs0.savannah.gnu.org> <20180922154640.9D58220310@vcs0.savannah.gnu.org> <54108dbc-9d12-06ff-3f1d-151118e9b234@yandex.ru> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1545968676 28520 195.159.176.226 (28 Dec 2018 03:44:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2018 03:44:36 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 28 04:44:32 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcj4Y-0007Hd-1J for ged-emacs-devel@m.gmane.org; Fri, 28 Dec 2018 04:44:30 +0100 Original-Received: from localhost ([127.0.0.1]:56716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcj6e-0004Mp-Si for ged-emacs-devel@m.gmane.org; Thu, 27 Dec 2018 22:46:40 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcj5x-0004MX-ON for emacs-devel@gnu.org; Thu, 27 Dec 2018 22:45:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcj5u-0005lH-Cn for emacs-devel@gnu.org; Thu, 27 Dec 2018 22:45:57 -0500 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:43596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gcj5u-0005kz-4H for emacs-devel@gnu.org; Thu, 27 Dec 2018 22:45:54 -0500 Original-Received: by mail-lj1-x22e.google.com with SMTP id q2-v6so17704057lji.10 for ; Thu, 27 Dec 2018 19:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=GkuBzDsqPeETwlqCaQyg6ow0j3kxkLI9IE4aJg6/tFo=; b=UF8yLozEJrdeZ+Bg2Nu/AkrrLIqZTddifzA1ZbKelzqgy3ILjRVVUo7jD2t8XTo5fA Oq7q8CpDnAOxjs8/WzKbleP8nslNZ9gM6/1XuDKX+d25jaZXi90qURmo9pGM+EjUvjyN AenM/WWcabuCfo5D+O1BylJwsOuT/cLlyfj4hIxXV5MR0euANM7gnD3Kj+D3iLA9beys kTLTDoScfW7N7cn3tNtRnmetSv8XZEEbrKPrTGh6r3BwUVVtJki2FyLs9WVfdhW8w3A4 qphWr5sQ2lw+5huGmei2y1MvyX+Jx3AEvQ+CkYuseeXAS6wKlhkFkl+7FdX6UvTSIg6i kmTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=GkuBzDsqPeETwlqCaQyg6ow0j3kxkLI9IE4aJg6/tFo=; b=SMvimjO2KSZj0ItGQ0Wee2RUrDZjJoznkCDx+9MWo2QxyxHb3alntu+wqiS0QSjuHr 1FZBS5M5opNz2UslR6mnsJPFn2reC/31YF9BdVsI9ilvX4qUw2Vd2nq8fxJGFWYVJIzS kIv3sBpI9xWD6wLon6e/JbvOmYwSXK8ptepv9Y2Iya/700q6zdWBEQ3Xyq8g5z3l7rol vqHVbbx/48s0G3el529vaVhspgrhsk2NIzdX1r4a9osFyVmdpaJsJ6eDpFgwiMoMlIyz atWM35cMkEVpGayLonw9t6KjJSZ/CoDuI4Qnf3W322S0WsZnk+5+we+9HT//BPtBOk3s zRag== X-Gm-Message-State: AA+aEWZv8KHOildGgRmDxMW0RMThB0yp3OxBoKL3EGPTqK83Zg1GqN5b h106+aTWffD3bXpVpH2J8lPYx3bqwXU= X-Google-Smtp-Source: ALg8bN6lqgolXBuCqeRTOGnqPjEY+rblp4vEeXp6hUtWB0dTO8/4Qc43FwI8IEcMq1bqe2204+O49w== X-Received: by 2002:a2e:99d7:: with SMTP id l23-v6mr14588949ljj.165.1545968752534; Thu, 27 Dec 2018 19:45:52 -0800 (PST) Original-Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id u30sm8669988lfc.90.2018.12.27.19.45.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Dec 2018 19:45:51 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232013 Archived-At: On 27.12.2018 16:39, Stefan Monnier wrote: > Right. But I'm not sure which one should be the "canonical" one. > Currently, the "canonical" one is the completion-table, and the > files-list is defined based on it (while it's current definition only > handles flat completion, that could be improved). A flat list is a simpler structure, so we'd choose it by default. Less margin of error for implementors. What are the main benefits of making the completion table overridable? The potential of an external process doing the matching for us (and doing it faster on nonempty inputs)? Returning completion table metadata? >> I wonder if we could efficiently implement project-find-regexp on top of >> a sequence like that, i.e. pipe to Grep with little overhead. > > I can't see any reason why not. I gave it a try, to reimplement project-find-regexp based on project-files is a straightforward way, pushed to branch scratch/project-files-pipe-grep. Unfortunately, I couldn't exactly reach the performance of the find+grep version. Try: (benchmark 10 '(project-find-regexp "xyz1")) => 5.60s (benchmark 10 '(project-files-pipe-grep "xyz1")) => 6.31s or 6.10s, depending on the version Any suggestions? This is without streams, but I'm now more skeptical about their possible performance benefits in this scenario. >> But this approach also needs the completion table to be flat, right? > > Not necessarily: we could accumulate the prefix as long as it's the > sole completion. I think I see what you mean.