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: Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Date: Thu, 24 Nov 2022 08:42:25 +0000 Message-ID: References: <87zgcq68zp.fsf@ericabrahamsen.net> <878rkale3l.fsf@dfreeman.email> <4c5f4b07-3df6-d700-83f8-9a9d1b684afc@yandex.ru> <84781346-5b88-2be5-38bb-02696fcf1364@yandex.ru> <87o7t2vj19.fsf@dfreeman.email> <877czqtyfy.fsf@dfreeman.email> <87zgcml7g7.fsf@gmail.com> <2ba04533-097a-a1da-ff3f-2c9506fd488e@yandex.ru> <875yf9bbzb.fsf@gmail.com> <87wn7oa0aw.fsf@gmail.com> <7a5b76fd-fb15-8c1e-ea29-bf11f7e0d2ae@yandex.ru> <87bkoya815.fsf@gmail.com> <0024a67d-b8e5-b35c-1b22-82541a170eb3@yandex.ru> <871qptai4d.fsf_-_@gmail.com> <71addecc-373e-b1f0-f190-0ce3531626a8@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000086f73505ee335e4a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15109"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , Danny Freeman , Eric Abrahamsen , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 24 09:42:07 2022 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 1oy7o6-0003jy-Sa for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 09:42:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy7nR-0001KF-9v; Thu, 24 Nov 2022 03:41:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oy7nP-0001Jz-Gn for emacs-devel@gnu.org; Thu, 24 Nov 2022 03:41:23 -0500 Original-Received: from mail-oi1-x236.google.com ([2607:f8b0:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy7nN-0006jK-Mv for emacs-devel@gnu.org; Thu, 24 Nov 2022 03:41:23 -0500 Original-Received: by mail-oi1-x236.google.com with SMTP id q83so920491oib.10 for ; Thu, 24 Nov 2022 00:41:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=XcANnvIUY5d5XZf5tg6qkYNqxBBYh7qdddGvDE4c4f4=; b=kQfw/3Ak3Rp/bkYjQZj98WDBkwge2sGHf4voV8B3xzbIFLhaZwF8AzTlMRU/Be3rH6 7cI6Go1pH/iJ8xU0NaGSXBdz8BrmYJnJH+xm8tTtsQ7f3D+DmRNBTMqf1EIm1WKQVuqA X+kiwS8MehyaaH76U53OSlIow6Y4N32dqsMEB/vhtWO4dpqpYOPDU/9bzFxmp6w+aP25 pq1w/Z0OUpZYHAL3xCBwB2RvJvus7C4JBfIgbRwQYNm6E4uogbQU9o7OdQJpghMFHERj J75tT+KP/YFInE45xcWXie+YXJuhtrtCFwI65KhnFzc8NX14eUk4G0PXwdMjknHQUHC5 sZ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XcANnvIUY5d5XZf5tg6qkYNqxBBYh7qdddGvDE4c4f4=; b=DviO3Je5tSznoICrutq43vxsUNBTstjLoClBFz7/r+vNCn3QMzev4qrmC7oOo0O+vr oxnSBm1HUow+M8ZKlgYoQaIvFd+wqtDC3i3v8BXPwOqGXQvbPleFGzJRNvs8lS60q2Tn InLC18pHhJiZHFVH1lAC432yW3B0z1F9Hgxmi8f5E4sdjVPlmrU6adN8RzVxYT4f+io8 KE81fTykf7BnkeF2MwI+f01HQ1nLIz5Jd59wH7ADX30eMK8vHrA0vnMXdvIH3evs8Nk2 DFi1RKaiVJFq+JcYusKSYmj6ocRVZVEGwy6+OwzDdN9boQ34NGQTuDuwlAqNXAJ5YOqN sZ+g== X-Gm-Message-State: ANoB5pnL/9FbtEHYDSy/zJbP/hnuxbBNB5IzSdUrpzr/21XGmlVZ6VSn Gh8IE5pYw3QIvNcvTtRm4k9ggywC1SRdZBBf8ow= X-Google-Smtp-Source: AA0mqf4squKy1P21Vw4XYbRUdA/H0MA++Fy0yY+7weFAMM9HX56MuKVmvyJZ5wW98S592IQLazw4GUrK6YLYG6tnY7U= X-Received: by 2002:aca:170d:0:b0:35a:7e8d:8ad6 with SMTP id j13-20020aca170d000000b0035a7e8d8ad6mr6254801oii.171.1669279280197; Thu, 24 Nov 2022 00:41:20 -0800 (PST) In-Reply-To: <71addecc-373e-b1f0-f190-0ce3531626a8@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::236; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x236.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, HTML_MESSAGE=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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300432 Archived-At: --00000000000086f73505ee335e4a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Nov 24, 2022 at 2:49 AM Dmitry Gutov wrote: > On 23/11/22 22:33, Jo=C3=A3o T=C3=A1vora wrote: > > For my idea to work, project-current would have to be changed to > > > > 1. Call all members of project-find-functions: return the innermost > > project found thus far. > > 2. Not call project-find-functions recursively when called from within = a > > function > > in project-find-functions, just return the innermost project found > > thus far. > > > > I don't see any big performance problems in this alternative. > > Might not be much of a difference in a simple configuration, but going > up and down dirs is not free even on a fast SSD, especially as the > number of the elements on this hook grows. > > But where you will definitely see a difference, is when using this with > Tramp. > Have you seen the code I posted? You'll notice that it doesn't do any file system operations, it just does file name operations. And those run in CPU/memory, not file system. So I cannot understand your argument. But I am happy to measure performance in different scenarios, if you'd like to suggest a particularly problematic one. Jo=C3=A3o --00000000000086f73505ee335e4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Nov 24, 2022 at 2:49 AM Dmitry Gu= tov <dgutov@yandex.ru> wrote:=
On 23/11/22 22:33, Jo=C3=A3o T=C3=A1vora wrote:
> For my idea to work, project-current would have to be changed to
>
> 1. Call all members of project-find-functions: return the innermost >=C2=A0 =C2=A0 =C2=A0project found thus far.
> 2. Not call project-find-functions recursively when called from within= a
> function
>=C2=A0 =C2=A0 =C2=A0in project-find-functions, just return the innermos= t project found
>=C2=A0 =C2=A0 =C2=A0thus far.
>
> I don't see any big performance problems in this alternative.

Might not be much of a difference in a simple configuration, but going
up and down dirs is not free even on a fast SSD, especially as the
number of the elements on this hook grows.

But where you will definitely see a difference, is when using this with Tramp.

Have you seen the code I posted?= =C2=A0 You'll notice that it doesn't do
any file system o= perations, it just does file name operations. And
those run in CP= U/memory, not file system. So I cannot understand
your argument.= =C2=A0 But I am happy to measure performance in different
scenari= os, if you'd like to suggest a particularly problematic one.
=
Jo=C3=A3o
--00000000000086f73505ee335e4a--