git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Monotone workflow compared to Git workflow ( was RE: Git vs Monotone)

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 31, 2008, 21:40 UTC
Message-ID
<alpine.LFD.1.10.0807311426090.3277@nehalem.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.10.0807311253140.3277@nehalem.linux-foundation.org>
On Thu, 31 Jul 2008, Linus Torvalds wrote:
> 
> Sure, if you want to keep the build tree around, you would probably not 
> use branches. 

Side note: it's often faster to recompile, if your project has a good build system.

For example, for the kernel, I can literally rebuild my whole kernel (which is just what I use on _that_ machine) in about 16 seconds. This is _not_ using ccache or anything else - it's rebuilding the whole tree with -j16.

It turns out that using multiple build trees would actually slow things down, because then the source code wouldn't fit in memory any more. If I have to actually read the source code from the disk, my nice 16-second compile goes up to a minute or more.

Now, the thing you should take away from this is:
 - kernel people have cool toys, and CPU's that are faster than what you 
   have. Nyaah, nyaah.
 - disk is slow. REALLY slow. If you can share most of a single source 
   tree and thus keep it in memory, you're ahead.
 - even large projects can have a fast build cycle if your build chain 
   doesn't suck. The kernel is larger than most, but a _lot_ of build 
   systems don't parallelize or use horribly inefficient tools, so they 
   take much longer to build. 

The last part is the thing that people often stumble on. For example, I can literally compile the kernel a hell of a lot faster than I can do "make doc" on the git tree! Even just trying a "make -j16" when building the git documentation is really really really painful. I suspect I'd need a ton more memory for that horror.

So if your workflow involves xml (I think the doc build for git is all xsltproc - along with asciidoc written in python or something), you're screwed. But in the kernel we've actually cared pretty deeply about build times, and as a result it's actually very pleasant to switch branches and just rebuild. Even if some core header file has changed, it's _still_ ok if you've got enough CPU.

(I just tested - I can do a "make doc" for git in just under a minute from a clean tree. Ouch. That really is three times longer than my kernel build - as long as I brought the kernel and compiler into memory first ;)

			Linus
Previous: Martin LanghoffNext: Dmitry Torokhov
Message 25 of 33 in “Git vs Monotone”
  1. Sverre RabbelierJul 31, 2008
  2. Stephen R. van den BergJul 31, 2008
  3. Petr BaudisJul 31, 2008
  4. Jeff KingJul 31, 2008
  5. Craig L. ChingJul 31, 2008
  6. Sverre RabbelierJul 31, 2008
  7. Jeff KingJul 31, 2008
  8. Linus TorvaldsJul 31, 2008
  9. Craig L. ChingJul 31, 2008
  10. Linus TorvaldsJul 31, 2008
  11. Junio C HamanoJul 31, 2008
  12. Linus TorvaldsJul 31, 2008
  13. Felipe ContrerasAug 23, 2008
  14. Blum, RobertJul 31, 2008
  15. Robin RosenbergAug 10, 2008
  16. David KastrupAug 1, 2008
  17. Monotone workflow compared to Git workflow ( was RE: Git vs Monotone)Craig L. Ching, Jul 31, 2008
  18. Linus TorvaldsJul 31, 2008
  19. Shawn O. PearceJul 31, 2008
  20. Craig L. ChingJul 31, 2008
  21. Björn SteinbrinkJul 31, 2008
  22. Avery PennarunJul 31, 2008
  23. Linus TorvaldsJul 31, 2008
  24. Martin LanghoffJul 31, 2008
  25. Linus TorvaldsJul 31, 2008
  26. Dmitry TorokhovAug 1, 2008
  27. Linus TorvaldsAug 1, 2008
  28. Linus TorvaldsAug 1, 2008
  29. Sean EstabrooksJul 31, 2008
  30. Theodore TsoJul 31, 2008
  31. Theodore TsoJul 31, 2008
  32. Sverre RabbelierAug 1, 2008
  33. Daniel BarkalowAug 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.