boostorg / boostorg/boost

Avoiding slowness for git submodule

Open
#421 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
8.6k
Forks
1.9k
Avg merge
39m
Merged PRs (30d)
2

Description

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..ignore`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-submoduleltnamegtignore) for mitigating this kind of situation. I've modified my `.gitmodules` and confirmed it's working.

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

__after:__
```gitconfig
[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?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the linked wiki page's “Installing Boost” section and review the reported .gitmodules workaround using submodule..ignore = all. Add a concise note explaining the git status slowdown and workaround, then verify that the guidance matches the configuration shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.