git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH 1/4] gitfaq: add advice on monorepos
Date: Wed, 20 Oct 2021 13:55:43 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2110201349570.56@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20211020010624.675562-2-sandals@crustytoothpaste.net>

Hi brian,

thank you for this excellent idea to talk about monorepos.

On Wed, 20 Oct 2021, brian m. carlson wrote:

> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt
> index 8c1f2d5675..946691c153 100644
> --- a/Documentation/gitfaq.txt
> +++ b/Documentation/gitfaq.txt
> @@ -241,6 +241,32 @@ How do I know if I want to do a fetch or a pull?::
>  	ignore the upstream changes.  A pull consists of a fetch followed
>  	immediately by either a merge or rebase.  See linkgit:git-pull[1].
>
> +Design
> +------
> +
> +[[monorepos]]
> +Should we use a monorepo or many individual repos?::
> +	This is a decision that is typically made based on an organization's needs and
> +	desires for their projects.  Git has several features, such as shallow clone,
> +	partial clone, and sparse checkout to make working with large repositories

May I request taking out shallow clones? A user new to Git might think
that shallow clones are a sane way to clone a large repository. In
practice, this only makes sense for "throw-away" clones, though. As soon
as you fetch in such clones, performance will be so horrible that it is
frequently a better idea to start with a partial clone instead.

At the same time, I would like to swap in "sparse index" for "shallow
clone" because it _does_ have the best potential of all currently
discussed new features to improve performance with monorepos.

> +	easier, and there is active development on making the monorepo experience
> +	better.
> ++
> +However, at a certain size, the performance of a monorepo will likely become
> +unacceptable _unless_ you use these features.  If you choose to start with a

I would like to add a plug for Scalar here. Maybe we can link to this
"opinionated tool based on Git" here? I wouldn't ask if I didn't _know_
that it helps monorepo users out there.

> +monorepo and continue to grow, you may end up unhappy with the performance
> +characteristics at a point where making a change is difficult.  The performance
> +of using many smaller repositories will almost always be much better and will
> +generally not necessitate the use of these more advanced features.  If you are
> +concerned about future performance of your repository and related tools, you may
> +wish to avoid a monorepo.
> ++
> +Ultimately, you should make a decision fully informed about the potential
> +benefits and downsides, including the capabilities, performance, and future
> +requirements for your repository and related tools, including your hosting
> +platform, build tools, and other programs you typically use as part of your
> +workflow.

I wish we had a good article to link to, here. Yes, it is a decision that
should be fully informed, and yes, this FAQ entry is not the place for a
thorough discussion of monorepos and how Git can be asked to handle them
more efficiently.

Do you know of any good resource that we could use here?

Thanks,
Dscho

> +
>  Merging and Rebasing
>  --------------------
>
>

  parent reply	other threads:[~2021-10-20 11:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20  1:06 [PATCH 0/4] Additional FAQ entries brian m. carlson
2021-10-20  1:06 ` [PATCH 1/4] gitfaq: add advice on monorepos brian m. carlson
2021-10-20  4:45   ` Bagas Sanjaya
2021-10-20 10:54   ` Ævar Arnfjörð Bjarmason
2021-10-20 21:19     ` brian m. carlson
2021-10-20 11:55   ` Johannes Schindelin [this message]
2021-10-20 14:11   ` Philip Oakley
2021-10-20 22:22     ` brian m. carlson
2021-10-25 10:44       ` Philip Oakley
2021-10-20  1:06 ` [PATCH 2/4] gitfaq: add documentation on proxies brian m. carlson
2021-10-20 11:57   ` Johannes Schindelin
2021-10-20 22:17     ` brian m. carlson
2021-10-20 14:48   ` Junio C Hamano
2021-10-20 22:19     ` brian m. carlson
2021-10-20  1:06 ` [PATCH 3/4] gitfaq: give advice on using eol attribute in gitattributes brian m. carlson
2021-10-20  1:21   ` Eric Sunshine
2021-10-20  1:27     ` brian m. carlson
2021-10-20 12:02       ` Johannes Schindelin
2021-10-20 22:25         ` brian m. carlson
2021-10-21 12:02           ` Johannes Schindelin
2021-10-20  1:06 ` [PATCH 4/4] doc: add a FAQ entry about syncing working trees brian m. carlson
2021-10-20  4:58   ` Bagas Sanjaya
2021-10-20 14:05     ` Philip Oakley
2021-10-20 23:35   ` Ævar Arnfjörð Bjarmason
2021-10-21  0:03     ` brian m. carlson
2021-10-21  0:33       ` Ævar Arnfjörð Bjarmason
2021-10-20  1:06 ` [PATCH 4/4] gitfaq: add " brian m. carlson
2021-10-20  1:38   ` Eric Sunshine
2021-10-20 21:36     ` brian m. carlson
2021-10-20 12:09   ` Johannes Schindelin

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.QRO.7.76.6.2110201349570.56@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    /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 public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).