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

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Craig L. Ching <cching@...>
Cc: <sverre@...>, Git Mailinglist <git@...>
Date: Thursday, July 31, 2008 - 5:40 pm

On Thu, 31 Jul 2008, Linus Torvalds wrote:

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Git vs Monotone, Sverre Rabbelier, (Thu Jul 31, 2:13 pm)
Re: Git vs Monotone, Sverre Rabbelier, (Fri Aug 1, 3:23 am)
Re: Git vs Monotone, Daniel Barkalow, (Fri Aug 1, 2:00 pm)
Re: Git vs Monotone, Theodore Tso, (Thu Jul 31, 3:24 pm)
Re: Git vs Monotone, Linus Torvalds, (Thu Jul 31, 3:17 pm)
Re: Monotone workflow compared to Git workflow ( was RE: Git..., Linus Torvalds, (Thu Jul 31, 5:40 pm)
RE: Git vs Monotone, Craig L. Ching, (Thu Jul 31, 3:28 pm)
RE: Git vs Monotone, Linus Torvalds, (Thu Jul 31, 3:52 pm)
RE: Git vs Monotone, Blum, Robert, (Thu Jul 31, 4:42 pm)
Re: Git vs Monotone, Robin Rosenberg, (Sun Aug 10, 6:15 pm)
Re: Git vs Monotone, Junio C Hamano, (Thu Jul 31, 4:24 pm)
Re: Git vs Monotone, Felipe Contreras, (Sat Aug 23, 3:23 pm)
Re: Git vs Monotone, Linus Torvalds, (Thu Jul 31, 4:30 pm)
Re: Git vs Monotone, Jeff King, (Thu Jul 31, 3:02 pm)
Re: Git vs Monotone, Sverre Rabbelier, (Thu Jul 31, 3:19 pm)
Re: Git vs Monotone, Jeff King, (Thu Jul 31, 4:32 pm)
RE: Git vs Monotone, Craig L. Ching, (Thu Jul 31, 3:11 pm)
Re: Git vs Monotone, Stephen R. van den Berg, (Thu Jul 31, 2:33 pm)
Re: Git vs Monotone, Petr Baudis, (Thu Jul 31, 2:52 pm)