devxlogo

How Facebook Scaled Mercurial

How Facebook Scaled Mercurial

In a recent blog post, Facebook’s Durham Goode and Siddharth Agarwal explained how they modified the Mercurial version control system to meet their company’s needs.

At issue was the vast size of Facebook’s source code—”many times larger than even the Linux kernel, which checked in at 17 million lines of code and 44,000 files in 2013.” The company decided to modify an existing version control system to enable better scalability, and they settled on Mercurial as the one that would work best for their purposes. Unfortunately, at that time, Mercurial wasn’t as fast as Git as some other alternatives.

The team contributed more than 500 patches to Mercurial to speed its performance. They also integrated their Watchman file monitoring tool and found that it “made Mercurial’s status command more than 5x faster than Git’s status command.” They then created a remotefilelog extension, which “made Mercurial clones and pulls 10x faster, bringing them down from minutes to seconds,” as well as offering other performance benefits.

View article

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist