4 ms·
Beside clean builds is Git branch checkouts. I hit this at least twice a week. Finish a feature branch and push it. Check out master. Pull master. Make new fea
by zlynx 7y ago
Beside clean builds is Git branch checkouts. I hit this at least twice a week.
Finish a feature branch and push it. Check out master. Pull master. Make new feature branch. Get an urgent bug fix request, switch to release branch, make a bugfix branch. Now go back to the new feature.
During this I may end up doing large rebuilds because Git changes modification times even if you end up back with the same header file you started with.
On a Thinkpad T540 the rebuild can take 30 minutes. It's less than 5 on a 3900X.
- namibj 7y agoUse a build system that works with input-hashes. djb's redo is an example.
- nwallin 7y agoccache solves this fairly well if you're on *nix.
- boring_twenties 7y agoDo you know about `git worktree`? You may not want a separate one for each branch you work on, but at least one for master and one for release would help you I think.
- zlynx 7y agoThere are problems with worktree. But yes, I often do use multiple checkout directories. When you do the git clone using the --reference option it gets most of the objects from the referenced directories. But this still results in slow compile times because the less used release directories get stale, have to be pulled up to date and often mostly rebuilt anyway. If I remember to actually use the second checkout directory, it does save on needing to rebuild the master/feature branches afterward.