When I talked about submodules vs. subtrees before, one of the things I listed as a benefit for subtrees was the speed of the initial clone. I’d written a few scripts to help me benchmark the two, and with a little extra time that I have this weekend, I thought I’d share the data.
I generated 2, 4, 6, 8, and 10 plugin repositories for both submodules and subtrees and cloned each one ten times over both a local and a remote connection. Here is the result:
As you can see, submodules take longer for each one you add and subtrees stay pretty much the same. Here’s the R code to generate the above graph:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
The generation and benchmarking scripts as well as the reported data and code are in my submodule_vs_subtree repo on github.