From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: progmodes/project.el and search paths Date: Tue, 04 Aug 2015 07:52:23 -0400 Message-ID: <55C0A777.1030101@gmail.com> References: <55BE209F.1000009@siege-engine.com> <55BE509B.2080307@yandex.ru> <55BEC1B5.6060204@gmail.com> <55BFEF66.1090505@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1438689181 27704 80.91.229.3 (4 Aug 2015 11:53:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2015 11:53:01 +0000 (UTC) To: Dmitry Gutov , Eric Ludlam , Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 04 13:52:43 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZMalv-0007Kx-Mc for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 13:52:43 +0200 Original-Received: from localhost ([::1]:34721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMalv-0008LF-0z for ged-emacs-devel@m.gmane.org; Tue, 04 Aug 2015 07:52:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMalh-0008LA-30 for emacs-devel@gnu.org; Tue, 04 Aug 2015 07:52:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMald-00024A-2M for emacs-devel@gnu.org; Tue, 04 Aug 2015 07:52:29 -0400 Original-Received: from mail-vk0-x232.google.com ([2607:f8b0:400c:c05::232]:33603) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMalc-000246-Ts for emacs-devel@gnu.org; Tue, 04 Aug 2015 07:52:24 -0400 Original-Received: by vkgc186 with SMTP id c186so2516253vkg.0 for ; Tue, 04 Aug 2015 04:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Xc+YzAb+kUzfpyHKUKuO77fLMlXRq3ARwUrnDylbHT4=; b=wTyNZ9BoJoAuiLSk4+J6cZ7/fbr9mDCDSXzsYGZEfyXPBuI/NT5rRwrmBXXQF3JoTd kAKOkLTqlsnKZ0a01n8meHIB1zBuXqqdCAgBQBBP2zkZBGnvBrs9hk7VA8jJ0Qa5TwK3 oBOwB93opj+DW7tn2iyIgBAeYzzIFekrHLOjIzTijQoS2MkJDRf6JY8FahKrqGSwjpdM mn43dFZH6dI2Roz0Lvcm5vQZfQZn9+7CW/+JtOtnfVuRVhNFPTt2U8P0w5qp93pzOB5r d07iZq8HHAbTqJMHkcr5ZH9vkZayrY4hSqw5ltvP+XqkoZuXF0xO9+wR43vqzaHNGDJA ubNg== X-Received: by 10.52.98.131 with SMTP id ei3mr4444674vdb.2.1438689144487; Tue, 04 Aug 2015 04:52:24 -0700 (PDT) Original-Received: from [192.168.1.202] (pool-71-184-198-118.bstnma.fios.verizon.net. [71.184.198.118]) by smtp.googlemail.com with ESMTPSA id ea7sm152692vdb.0.2015.08.04.04.52.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Aug 2015 04:52:23 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <55BFEF66.1090505@yandex.ru> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400c:c05::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188389 Archived-At: On 08/03/2015 06:47 PM, Dmitry Gutov wrote: >> My >> experience has been that tools that depend on a project to ask what the >> current project is do so a lot. As such, I cache the current project, >> and current root project as buffer local variables. Those project >> structures then have relevant meta data as well. Another tactic is >> initializing each buffer into a project as it is created. That moves >> search time into a different timing that is less noticeable than >> on-demand when the user makes a request. > > IME, (vc-call-backend backend 'root dir) takes a negligible amount of > time, so we might as well call it once per command. Of course, it > might be different when using Tramp, but both Tramp and VC do some > caching of their own. Other project implementations are free to employ > their own caching methods (might be buffer-local, or if the > implementation considers that only one project might be enabled at a > time, simply in its own variables). That is true now for project.el. Once you support 20+ project definitions as in EDE where vc is just one of them, all that negligible time adds up. Asking all 20+ project definitions to do their own caching is something EDE used to do, and it was a pain to maintain. I recommend against it. Eric