website/docs/scale/overview.md
Sapling supports large monorepos that have tens of millions of files and commits, with tens of thousands of contributors.
This scale imposes performance challenges in various areas. Operations that require all files or all commits (O(files) or O(commits)) space or time complexities are gradually no longer affordable. Push throughput could also be an issue.
Over time, Sapling made many improvements to tackle the above challenges:
Besides improving scale and performance, we also strove to build a robust development experience. To avoid developers losing their work due to hardware failures, we back up all commits as they are created to our "commit cloud". Unlike other systems, the developer doesn't have to expressly push their commits for them to be shareable and durable.
Sapling started from Mercurial as a distributed source control system, it then transitioned to a client-server architecture to solve the challenges. The server can utilize distributed storage and pre-build various kinds of indexes to provide more efficient operations.
While Sapling is less "distributed", we tried to make the difference transparent to the user. For example, our lazy commit graph implementation does not require extra commands to "deepen" the graph. The user sees full history.
That said, we do drop support of pulling from a lazy repo. Commit cloud covers these use-cases.