Submodules are currently cloned fully, even if the shallow option is set. Respecting the shallow option for submodules would speed up updates.
But how to know the depth though?
EDIT: Ahh I always thought this wasn't possible, but nice surprise to see there may be ways to do this now. See the updates to this answer: https://stackoverflow.com/a/17692710. So sorry for the noise if you already knew about this! :|
IIRC this was proposed in the past but for backward compatibility reasons (I think that @junegunn, as others, works with some OS that don't have enough recent version of git by default) and since we're basically just talking about YouCompleteMe there are some concern to complicate the code to handle this just for one plugin :/
From http://stackoverflow.com/a/38895397/1297064:
since Git 2.10+ (Q3 2016), you will be able to do a regular clone... and still benefit from shallow clone for submodules.
All you need to do is record that configuration in your.gitmodules:git config -f .gitmodules submodule.<name>.shallow true
The responsibility for managing shallow submodules would then be better taken by the plugin author.
Most helpful comment
From http://stackoverflow.com/a/38895397/1297064:
The responsibility for managing shallow submodules would then be better taken by the plugin author.