Meta maintains all their code in a single repository and initially
used Git
is that really true?
https://engineering.fb.com/2014/01/07/core-infra/scaling-mercurial-at-facebook/
says:
..our then-current technology, a Subversion server with a Git mirror..
and the other famous example of google..
https://qeunit.com/blog/how-google-does-monorepo/
Historically under CVS, the source code was quickly migrated to Perforce.
The problems of branching in perforce and subversion are very different to git. gits branching model solves many of the issues with older styles of source control.
I would venture to suggest that people make mono repos because they heard google and facebook did, not because they hit the same problems.
If we dig into google's solution, we can see there is a selective compilation of changes, it's kind of split up into components even if its called a mono-repo.
Facebook famously uses PHP, an interpreted language. Naively used, you need all the source code to run it, no dlls, so no separate repos.
My take away from these, admittedly sparse articles, is that google and meta found it too hard to refactor to a componentized version of their software products. Instead they attacked the face value problems the developers were experiencing, Slow branching and merging of massive codebases, by optimising the source control software.
Those of us old enough to remember SourceSafe will know the pain of slow source control and copying all the files just to make a branch. When someone comes along and makes it 10x faster, that's great and you jump at it. But I don't think I would go back from git's delta based model and any to any merges for love nor money