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
| Jeff Garzik | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Christoph Hellwig | Re: [malware-list] [RFC 0/5] [TALPA] Intro to a linux interface for on access scan... |
| Heiko Carstens | Re: -mm merge plans for 2.6.23 -- sys_fallocate |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Jens Axboe | Re: [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Emmanuel Dreyfus | fixing send(2) semantics (kern/29750) |
| Christos Zoulas | Re: Melting down your network [Subject changed] |
| Juan RP | Changing the I/O scheduler on-the-fly |
| Emmanuel Dreyfus | Re: fixing send(2) semantics (kern/29750) |
