Speed Comparison: GitHub vs. GitLab (2020)

Been a minute since I’ve done one of these comparisons. The first one took place in 2016 with annual follow ups in 2017 and 2018. Then there was the curious case of 2019 where I had this post in my queue but never actually ran the benchmarks.

I think the reason I never followed through is because the script I wrote to generate these metrics was in severe need of some lovin’ and at the time, I either didn’t want to put in the effort, or I ran into some hurdle that caused me to put a pin in it.

With that said, as I’m now primarily using GitLab for my private personal projects and still utilizing GitHub for most of my open source contributions, I thought it would be good to revisit these metrics.

Sure beats yet another opportunistic developer post on how to map COVID-19 data, amirite?

As mentioned, the script I wrote to knock this out did need some work, so I
did a bit of rework to the script to help simulate a bit more of a real world
scenario.

The script goes through cloning my test repository, then modifying a file,
committing and pushing it, then doing a pull. Each interaction with the code
hosting provider is run for 100 iterations and timed (with time). I threw the
results into a spreadsheet to grab the metrics published below.

Since the git pull portion of the script doesn’t pull anything new or changed
down, it falls a bit short. For a future iteration of this, I plan to have an additional copy of of the repository that I can make changes to then time pulling said changes down in my test bed.

Because I feel that doing a git push happens a bit more often than git pull in my day to day work flow, I don’t think too much is lost by not shoring that part of the benchmarks up for this post.

Fairly consistent with the previous benchmarks, GitHub did perform better in terms of running git clone, but with both git push and git pull GitLab’s totals just snuck by.

Here’s the results, which I focused in on the real output from time:

 git@github.com:joshtronic/test.gitgit@gitlab.com:joshtronic/test.git
 git clonegit pushgit pullgit clonegit pushgit pull
Minimum0.716s0.003s0.009s1.114s0.003s0.009s
Maximum1.217s0.005s0.015s4.339s0.006s0.015s
Average0.784s0.003s0.010s1.362s0.003s0.010s
Median0.773s0.003s0.010s1.195s0.003s0.010s
Mode0.753s0.003s0.010s1.191s0.003s0.009s
Total78.448s0.329s1.016s136.212s0.317s0.977s

If you’re interested in the data from all 100 iterations, you can check out the raw data in this Google Sheet.

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.


If you found this article helpful, please consider buying me a coffee.