Contents
How does a monorepo affect a Git project?
For example, large media assets added to an iOS client project in a monorepo are cloned despite a developer (or build agent) working on an unrelated project. Whether it’s the number of files, how often they’re changed or how large they are, these issues in combination have an increased impact on performance:
Can a git repository contain more than one project?
The repository contains more than one logical project (e.g. an iOS client and a web-application) These projects are most likely unrelated, loosely connected or can be connected by other means (e.g via dependency management tools) Size of content tracked (as measured by looking at the .git directory of the repository)
First, Git tracks the state of the whole tree in every single commit made. This is fine for single or related projects but becomes unwieldy for a repository containing many unrelated projects. Simply put, commits in unrelated parts of the tree affect the subtree that is relevant to a developer.
Is there such thing as a monolithic Git repository?
The good news for the vast majority of teams is that really, truly large monolithic repositories tend to be the exception rather than the rule, so as interesting as this post hopefully is, it most likely won’t apply to a situation that you are facing.
Why are there so many refs in a monorepo?
Add together many unrelated modules found in a monorepo and the performance issues compound. A large number of refs (i.e branches or tags) in your monorepo affect performance in many ways. Ref advertisements contain every ref in your monorepo.
Which is the first phase of the monorepo?
Ref advertisements contain every ref in your monorepo. As ref advertisements are the first phase in any remote git operation, this affects operations like git clone , git fetch or git push. With a large number of refs, performance takes a hit when performing these operations.
Do you need a release tag for monorepo?
Ask yourself this: if you’re working on a web application that is continuously deployed in a monorepo, what relevance does the release tag for the versioned iOS client have? Alongside these conceptual challenges are numerous performance issues that can affect a monorepo setup.