boost icon indicating copy to clipboard operation
boost copied to clipboard

Avoiding slowness for git submodule

Open saki7 opened this issue 5 years ago • 0 comments

I've recently started adding boostorg/boost as a git submodule for my own application. After experimenting, I've discovered that doing so will make your git status commands very slow (here ~3secs; normally ~0.2secs).

Note that your root repo will always look for your submodules' changes to keep everything in track, so the git command outside the boost submodule directory will also be affected

git has the option submodule.<name>.ignore for mitigating this kind of situation. I've modified my .gitmodules and confirmed it's working.

before:

[submodule "modules/boost"]
        path = modules/boost
        url = https://github.com/boostorg/boost.git

after:

[submodule "modules/boost"]
        path = modules/boost
        url = https://github.com/boostorg/boost.git
        ignore = all

I think this change has no disadvantages to most of the application developers, since they won't modify the contents of boostorg/boost itself during the development of their own program.

Could someone (with write permission) add some notes to the wiki describing the workaround mentioned above? https://github.com/boostorg/wiki/wiki/Getting-Started%3A-Overview#installing-boost

saki7 avatar Aug 14 '20 08:08 saki7