From: Tim Cross <theophilusx@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: "João Távora" <joaotavora@gmail.com>,
"Stefan Monnier" <monnier@iro.umontreal.ca>,
"Danny Freeman" <danny@dfreeman.email>,
"Eric Abrahamsen" <eric@ericabrahamsen.net>,
emacs-devel@gnu.org
Subject: Re: Subprojects in project.el (Was: Eglot, project.el, and python virtual environments)
Date: Mon, 28 Nov 2022 15:10:55 +1100 [thread overview]
Message-ID: <86cz97jzpi.fsf@gmail.com> (raw)
In-Reply-To: <43aa2f10-d947-dfcd-82b0-f6f1be3aaaec@yandex.ru>
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 25/11/22 00:46, Tim Cross wrote:
>> João Távora <joaotavora@gmail.com> writes:
>>
>>> On Thu, Nov 24, 2022 at 3:01 AM Dmitry Gutov <dgutov@yandex.ru> wrote:
>>>
>>>
>>>> I'm imagining that traversing a directory tree with an arbitrary
>>>> predicate is going to be slow. If the predicate is limited somehow (e.g.
>>>> to a list of "markers" as base file name, or at least wildcards), 'git
>>>> ls-files' can probably handle this, with certain but bounded cost.
>> I've seen references to superior performance benefits of git ls-file a
>> couple of times in this thread, which has me a little confused.
>> There has been lots in other threads regarding the importance of not
>> relying on and not basing development on an underlying assumption
>> regarding the VCS being used. For example, I would expect project.el to
>> be completely neutral with respect to the VCS used in a project.
>
> That's the situation where we can optimize this case: when a project is Git/Hg.
>
>> So how is git ls-file at all relevant when discussing performance
>> characteristics when identifying files in a project?
>
> Not files, though. Subprojects. Meaning, listing all (direct and indirect) subdirectories
> which satisfy a particular predicate. If the predicate is simple (has a particular project
> marker: file name or wildcard), it can be fetched in one shell command, like:
>
> git ls-files -co -- "Makefile" "package.json"
>
> (which will traverse the directory tree for you, but will also use Git's cache).
>
> If the predicate is arbitrary (i.e. implemented in Lisp), the story would become harder.
>
>> I also wonder if some of the performance concerns may be premature. I've
>> seen references to poor performance in projects with 400k or even 100k
>> files. What is the expected/acceptable performance for projects of that
>> size? How common are projects of that size? When considering
>> performance, are we not better off focusing on the common case rather
>> than extreme cases, leaving the extremes for once we have a known
>> problem we can then focus in on?
>
> OT1H, large projects are relatively rare. OT2H, having a need for subprojects seems to be
> correlated with working on large projects.
>
> What is the common case, in your experience, and how is it better solved? Globally
> customizing a list of "markers", or customizing a list of subprojects for every "parent"
> project?
In my personal experience, sub-projects have been more about project
structure and not size. I would agree they are more prevalent in large
projects, but can exist in medium and even smaller projects.
I don't think I have a preference for customizing a list of markers or a
list of sub project definitions per project. I suspect different
approaches will work better in different scenarios and neither is a
clear 'winner'. However, as pointed out by Stephan, terminology
confusion/meaning may well be contributing to the confusion here. Not
only am I unsure everyone is thinking the same thing when talking about
sub-projects, I'm not sure everyone is even talking about the same thing
when referencing 'project'.
I wrote a lot about how I use projects and sub-projects in my work flow
and then realised it probably isn't helping that much. It struck me that
perhaps the issue is that the notion of sub-projects isn't really that
useful in itself and may actually be more detrimental than useful.
When you think about it, a sub-project is really just a more narrow
project focus. A project is really just a collection of files and
environment settings which can be considered, for some purpose, as a
'unit' in itself. It might define the set of files used when considering
find and replace for a symbol, when looking for symbol completion
candidates, or file/buffer switching, opening, linting, cross
referencing etc. It may correspond to a VCS repository, but it may
not. It could cut across repositories, or it could be made up of
multiple repositories or it could simply be some bespoke virtual project
concept specific to a particular use case.
I guess what I want is the ability to define arbitrary collections of
files and environment settings as a project, have a way to select/target
a project and an API which various tools can use to get the files or
environment settings to then operate on. Whether one project can be
considered a sub-project of another project is less relevant compared to
the ability to select/identify the target project. Automatic definition
of projects based on VCS repositories is great and a real time saver,
but the ability to define what makes up a project manually is also
important. The ability of the system to automatically determine which
project is 'active' (for example, based on the location of the file
being opened) is good and having the system prompt you when it isn't
clear or when there are multiple options is useful, but just being able
to run a command to set the current project would also be
sufficient. However, how one project relates to another project i.e. sub
project, main project, etc, seem of limited use compared to just having
the ability to select a sub-set of the files and environment settings of
a project, whether we call these sub project or nested projects or
whatever, seems of limited benefit.
next prev parent reply other threads:[~2022-11-28 4:10 UTC|newest]
Thread overview: 139+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 18:37 Eglot, project.el, and python virtual environments Eric Abrahamsen
2022-11-16 22:24 ` Danny Freeman
2022-11-16 22:53 ` Eric Abrahamsen
2022-11-17 13:41 ` Danny Freeman
2022-11-17 18:06 ` Eric Abrahamsen
2022-11-17 18:48 ` Yuan Fu
2022-11-17 22:21 ` Tim Cross
2022-11-18 2:38 ` Phil Sainty
2022-11-18 7:43 ` Eli Zaretskii
2022-11-18 13:55 ` Danny Freeman
2022-11-18 15:22 ` Eli Zaretskii
2022-11-18 15:53 ` Danny Freeman
2022-11-18 19:36 ` Eric Abrahamsen
2022-11-18 15:06 ` Stefan Monnier
2022-11-18 15:17 ` Eli Zaretskii
2022-11-18 15:28 ` Stefan Monnier
2022-11-19 1:12 ` Dmitry Gutov
2022-11-19 7:42 ` Eli Zaretskii
2022-11-19 13:06 ` Dmitry Gutov
2022-11-19 13:14 ` Eli Zaretskii
2022-11-18 18:31 ` João Távora
2022-11-19 1:13 ` Dmitry Gutov
2022-11-19 1:56 ` João Távora
2022-11-19 15:23 ` Dmitry Gutov
2022-11-19 19:17 ` Danny Freeman
2022-11-19 19:49 ` Dmitry Gutov
2022-11-19 21:22 ` Danny Freeman
2022-11-20 1:51 ` João Távora
2022-11-20 15:36 ` Dmitry Gutov
2022-11-20 20:35 ` João Távora
2022-11-20 22:05 ` Dmitry Gutov
2022-11-21 13:45 ` João Távora
2022-11-22 15:48 ` Dmitry Gutov
2022-11-22 21:12 ` Stefan Monnier
2022-11-22 21:34 ` João Távora
2022-11-22 22:00 ` Dmitry Gutov
2022-11-22 23:23 ` João Távora
2022-11-23 0:03 ` Dmitry Gutov
2022-11-23 13:57 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) João Távora
2022-11-23 20:33 ` João Távora
2022-11-24 2:49 ` Dmitry Gutov
2022-11-24 8:42 ` João Távora
2022-11-24 22:17 ` Dmitry Gutov
2022-11-25 19:56 ` Subprojects in project.el João Távora
2022-11-25 22:33 ` Dmitry Gutov
2022-11-26 0:00 ` João Távora
2022-11-26 1:57 ` Dmitry Gutov
2022-11-26 9:23 ` João Távora
2022-11-26 13:34 ` Dmitry Gutov
2022-11-26 19:36 ` João Távora
2022-11-26 2:01 ` Dmitry Gutov
2022-11-26 9:24 ` João Távora
2022-11-24 2:51 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Dmitry Gutov
2022-11-24 6:23 ` Eli Zaretskii
2022-11-24 9:01 ` João Távora
2022-11-24 22:11 ` Dmitry Gutov
2022-11-25 7:30 ` Eli Zaretskii
2022-11-25 17:24 ` Dmitry Gutov
2022-11-25 19:45 ` Eli Zaretskii
2022-11-25 21:57 ` Dmitry Gutov
2022-11-25 23:55 ` Subprojects in project.el João Távora
2022-11-28 0:41 ` Dmitry Gutov
2022-11-26 7:26 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Eli Zaretskii
2022-12-02 1:32 ` Dmitry Gutov
2022-12-02 14:16 ` Eli Zaretskii
2022-12-02 15:08 ` Dmitry Gutov
2022-12-02 15:37 ` Dmitry Gutov
2022-12-02 15:44 ` Subprojects in project.el Stefan Monnier
2022-12-02 23:26 ` João Távora
2022-12-06 14:36 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) João Távora
2022-11-24 3:01 ` Dmitry Gutov
2022-11-24 8:50 ` João Távora
2022-11-24 22:46 ` Tim Cross
2022-11-24 23:38 ` Dmitry Gutov
2022-11-25 7:07 ` Bozhidar Batsov
2022-11-25 14:58 ` Subprojects in project.el Stefan Monnier
2022-11-25 22:29 ` Dmitry Gutov
2022-11-26 2:59 ` Stefan Monnier
2022-11-26 12:30 ` Dmitry Gutov
2022-11-26 17:32 ` Stefan Monnier
2022-11-27 0:25 ` Dmitry Gutov
2022-11-25 20:32 ` João Távora
2022-11-28 4:10 ` Tim Cross [this message]
2022-11-28 17:21 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Dmitry Gutov
2022-11-29 9:56 ` Subprojects in project.el João Távora
2022-11-29 18:40 ` Dmitry Gutov
2022-11-29 22:21 ` João Távora
2022-11-30 0:39 ` Dmitry Gutov
2022-11-30 0:54 ` João Távora
2022-11-30 0:57 ` Dmitry Gutov
2022-11-30 1:18 ` João Távora
2022-12-02 22:47 ` Richard Stallman
2022-12-02 23:46 ` Dmitry Gutov
2022-12-03 7:09 ` Eli Zaretskii
2022-11-24 22:58 ` Subprojects in project.el (Was: Eglot, project.el, and python virtual environments) Dmitry Gutov
2022-11-25 2:38 ` Subprojects in project.el Stefan Monnier
2022-11-25 20:23 ` João Távora
2022-11-25 22:23 ` Dmitry Gutov
2022-11-25 7:42 ` Juri Linkov
2022-11-25 20:27 ` Dmitry Gutov
2022-11-25 23:47 ` João Távora
2022-11-25 23:58 ` Dmitry Gutov
2022-11-26 0:46 ` João Távora
2022-11-26 2:07 ` Dmitry Gutov
2022-11-25 20:16 ` João Távora
2022-11-25 22:44 ` Dmitry Gutov
2022-11-26 0:37 ` João Távora
2022-11-26 2:05 ` Dmitry Gutov
2022-11-26 9:42 ` João Távora
2022-11-26 12:38 ` Dmitry Gutov
2022-11-29 10:03 ` João Távora
2022-11-29 10:17 ` João Távora
2022-11-29 19:07 ` Dmitry Gutov
2022-11-29 22:52 ` João Távora
2022-11-30 1:10 ` Dmitry Gutov
2022-11-27 19:25 ` Juri Linkov
2022-11-27 21:43 ` Dmitry Gutov
2022-11-22 23:53 ` "Backend completion style" as a first-class library. Re: Eglot, project.el, and python virtual environments João Távora
2022-11-23 1:45 ` Stefan Monnier
2022-11-25 13:16 ` João Távora
2022-11-22 21:40 ` João Távora
2022-11-22 22:13 ` Dmitry Gutov
2022-11-22 23:33 ` João Távora
2022-11-21 20:58 ` Augusto Stoffel
2022-11-23 3:37 ` Dmitry Gutov
2022-11-20 16:37 ` João Távora
2022-11-21 7:54 ` Eric Abrahamsen
2022-11-21 13:36 ` João Távora
2022-11-21 15:41 ` Alfred M. Szmidt
2022-11-21 16:49 ` Eli Zaretskii
2022-11-21 16:49 ` Eric Abrahamsen
2022-11-21 20:54 ` Augusto Stoffel
2022-11-19 23:25 ` João Távora
2022-11-19 23:40 ` Dmitry Gutov
2022-11-16 23:18 ` Philip Kaludercic
2022-11-17 1:14 ` Eric Abrahamsen
2022-11-17 6:47 ` North Year
2022-11-17 18:09 ` Eric Abrahamsen
2022-11-19 22:36 ` Stephen Leake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86cz97jzpi.fsf@gmail.com \
--to=theophilusx@gmail.com \
--cc=danny@dfreeman.email \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=eric@ericabrahamsen.net \
--cc=joaotavora@gmail.com \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.