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: Thu, 3 Jan 2019 14:45:29 +0300 Message-ID: References: <20180922154639.23195.66360@vcs0.savannah.gnu.org> <20180922154640.9D58220310@vcs0.savannah.gnu.org> <54108dbc-9d12-06ff-3f1d-151118e9b234@yandex.ru> <385f6543-2214-101c-30b8-a8115a8dbede@yandex.ru> <87zhsi7mlt.fsf@mail.linkov.net> <6ff6f811-29eb-6e08-e95c-46bdfee08993@yandex.ru> <878t02d0cz.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1546515821 15736 195.159.176.226 (3 Jan 2019 11:43:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 3 Jan 2019 11:43:41 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 Cc: Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 03 12:43:37 2019 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 1gf1PT-0003wR-4r for ged-emacs-devel@m.gmane.org; Thu, 03 Jan 2019 12:43:35 +0100 Original-Received: from localhost ([127.0.0.1]:52772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf1RZ-0007nQ-Qh for ged-emacs-devel@m.gmane.org; Thu, 03 Jan 2019 06:45:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gf1RR-0007nJ-W0 for emacs-devel@gnu.org; Thu, 03 Jan 2019 06:45:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gf1RO-0001ii-9W for emacs-devel@gnu.org; Thu, 03 Jan 2019 06:45:37 -0500 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:35126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gf1RN-0001hd-WB for emacs-devel@gnu.org; Thu, 03 Jan 2019 06:45:34 -0500 Original-Received: by mail-lj1-x231.google.com with SMTP id x85-v6so29479461ljb.2 for ; Thu, 03 Jan 2019 03:45:32 -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=svZj6iadutt03Zzkwe1bpsGg3WKONgZZ96QnJaBb3GE=; b=YwIlfuepg1ci1ma+6qkYvKyrLbKxv8YKSO32LOR9aN0mL6O56a8mNNeuRcKwH1Ba8O Xplo/KTouhwdqPAy7s5ypjYEhpz2IG7CqZfuroof1VaT7K6q5t5DyGnZZEER7cgURCkz WZa3yNrOeMANDn8bXy17z7TGswuke7NWdAz7hQzFGDnYdX8aLwBTA0bdaCrXBppt7EPs bt4dyyaiobpEidQGADmPh9oZikRZbLs1NHWOYQHMr8s8i1nTCcScgnxVtN/s/YzHPiig f4arCfhO8t03rg3+6sPgKi5bwIB8A/PbMEIALp7pYNuiLGmeahpbjvElkFP+wCyUV0v3 rQ+g== 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=svZj6iadutt03Zzkwe1bpsGg3WKONgZZ96QnJaBb3GE=; b=uVENHspN8o1QaiMYdx1q0ibYCxSZslEaDi7Fvpr0nv61ul0PbqBkhw6R/ph5dow8N9 1JqOhFhnO+YJn5b+hUy43nliR772EjeEn6Pj7CiYpPP3KGx4lAq29sReoybv3ckDJRqm mVJTeqeWedO5x5G2eXB5S8ry28m1BjlHH3k9NRIrBMKQralnTbkOsrKWSumqZjVzEHwu vtnN71FXOBdvvb58IyP2i1zidziq/B6a5T9OsD+hyZ3Cu631pLbaRLi9t2w+6tepyFv5 pbqRcUTM/xGBZLaOZA4vWKo938qK8tHKh3BJOApf7YzLMLN7XatlAPOBj+vOwJ1ycWfJ 8xAQ== X-Gm-Message-State: AJcUukfmzsPsTkCwfrsd8U9I3DPT3hMhBjL6zELr0MwWFpTMRo5M4Yjm DyZUOzVsIXgwry1CToYhnxkN+qd1 X-Google-Smtp-Source: ALg8bN639oLQvoaCZDTqd56on5VN2ILjrBfFBnjE2eGo+YQhB1hv9gnU4+NGc1TEhM9nsTzrTr8R4Q== X-Received: by 2002:a2e:484:: with SMTP id a4-v6mr26425623ljf.27.1546515931246; Thu, 03 Jan 2019 03:45:31 -0800 (PST) Original-Received: from [192.168.0.108] ([79.175.3.73]) by smtp.googlemail.com with ESMTPSA id k13-v6sm9215517lje.89.2019.01.03.03.45.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Jan 2019 03:45:30 -0800 (PST) In-Reply-To: <878t02d0cz.fsf@mail.linkov.net> 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::231 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:232132 Archived-At: On 03.01.2019 3:37, Juri Linkov wrote: > I tried with the latest c708231803 (at least ‘vc-log-mergebase’ shows > that it's the latest), but optimized: > > (dolist (f files) > (process-send-string process f) > (process-send-string process "\0")) > > was replaced with > > (process-send-string process (mapconcat #'identity files "\0")) > > with no performance impact. I tried this modification before, and it was slower, probably because of extra memory allocation. But on your machine it's probably hard to notice. > Trying 446bcaed37 has no difference either. That's unfortunate. > Are you sure that project-find-regexp uses ‘find ... -path’? Of course. What else would it be using to get the list of files? It delegates to xref-collect-matches which, as you can see, builds a grep-find command. The salient difference is that find sends its output directly to grep, instead of going through Emacs. > I see that slowness is because of many ‘-path’ filters used in project-files.o *shrug* It is indeed slower than 'git ls-files', and especially because of the filters, but see above. >> At least test (split-string (shell-command-to-string "git ls-files -z") "\0" t) > > Using this instead of ‘(project-files (project-current t))’: > > (benchmark 10 '(project-files-pipe-grep "xyz1")) > => 3s So... I guess that's better. Have you tried running the same command in a terminal and timing it? I wonder how it compares. The terminal will show us the best possible speed.