![]() With a large number of commits any command that walks the graph could become slow as the history deepens. This becomes especially troublesome as Git uses a directed acyclic graph (DAG) to represent the history of a project. Over time this can lead to a large number of commits with a significant rate of growth (Facebook cites “thousands of commits a week”). Managing unrelated projects in a single repository at scale can prove troublesome at the commit level. 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? Performance issuesĪlongside these conceptual challenges are numerous performance issues that can affect a monorepo setup. But usefulness of tags diminishes in the context of a monorepo. In Git, a tag is a named alias for a particular commit, referring to the whole tree. As the branch tip is changing all the time, frequent merging or rebasing locally is required to push changes. This issue is pronounced at scale with large numbers of commits advancing the history of the tree. Simply put, commits in unrelated parts of the tree affect the subtree that is relevant to a developer. This is fine for single or related projects but becomes unwieldy for a repository containing many unrelated projects. There are many conceptual challenges when managing unrelated projects in a monorepo in Git.įirst, Git tracks the state of the whole tree in every single commit made. The size of the .git directory was roughly 15GB.With thousands of commits a week across hundreds of thousands of files, Facebook’s main source repository is enormous-many times larger than even the Linux kernel, which checked in at 17 million lines of code and 44,000 files in 2013.Īnd while conducting performance tests, the test repository Facebook used were as follows: ![]() Size of content tracked (as measured by looking at the .git directory of the repository)įacebook has one such example of a monorepo:.These projects are most likely unrelated, loosely connected or can be connected by other means (e.g via dependency management tools).The repository contains more than one logical project (e.g.Definitions vary, but we define a monorepo as follows:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |