3 ms·
The problem is that the alternatives are much, much worse. There's nothing about the git/mercurial object models that makes them intrinsically inefficient with
by ot 5y ago
The problem is that the alternatives are much, much worse.
There's nothing about the git/mercurial object models that makes them intrinsically inefficient with monorepos.
What's inefficient is materializing the object database (when cloning) and the working copy (when checking out), when you're only going to need tiny portions of them.
Subversion doesn't have the first problem (but comes with extremely slow history operations), but sparse checkouts don't really solve the second because you have to statically know what to filter.
A better direction is instead to virtualize the filesystem, so you get the semantics of a real monorepo with git/mercurial, and you fetch only what's actually needed without any change to your tooling (it just needs to interact with the filesystem). It's also very easy to transparently implement caching and prefetching this way.
This is the approach that Facebook and Microsoft took, and I believe Google too.
- WorldMaker 5y agoThough it is interesting that Microsoft's own efforts have been moving away from the virtual filesystem approach and back towards making sparse checkouts better/more reliable and better/more reliable support for partial checkouts (of history especially) and better memoization and caching of history reachability information (git commit-graph).