That's interesting. It doesn't seem to speed up compilation, but it definitely speeds up linking. If you're making small changes to a large project so there isn't much compilation in a change , and relinking, you might well get this.
This is a good idea. Also, mounting a part of RAM on your filesystem would work fast, and it's cheap. Ramdisk is even faster and cheaper.
Show 4 more comments. Nemanja Trifunovic Nemanja Trifunovic 6, 1 1 gold badge 23 23 silver badges 34 34 bronze badges. Boy, that's a situation from hell. I do remember the mainframe days.
We did a lot of "desk checking" of code. It's amazing how much got done that way, such as endless simulations of flights to the moon. I can easily remember when builds took a long time.
Some mitigating approaches: Build the system by combining libraries or dlls. That way, when you modify some code, the only part that needs to be recompiled is your part. The number of points in the code you need to edit to implement a feature not only effects how much editing you have to do, but the frequency with which you put in bugs, amplifying the compile-debug-edit-compile loop.
Anything that reduces the redundancy of the code, such as DRY, helps. If you are in the debugger, and can edit, recompile, and continue without leaving the debugger, that is really helpful.
Mike Dunlavey Mike Dunlavey TrueDub TrueDub 2 2 silver badges 7 7 bronze badges. I've worked for a project that took an hour to compile and link from scratch on a single-core machine, PCHs and all. Of course, except for automatic release builds nobody would build it on just one processor core, but still If you had to change something in a header that's included just about everywhere string manipulation, error handling , you could go nuts.
Used to work years ago on a system that took, for a complete build, 48 hours to compile. Of course a full build was only ever started on friday evening, hopefully to be done when we got back to the office on monday. We instead built small modules as needed say a single DLL. Yes, if you are recompiling everything then it can take a very long time. However, if any thought at all is given to dependency management then 10 hour entire recompile projects can have incremental recompiles in less than a minute be the norm.
You all should be ashamed of yourselves wasting your employers time waiting for your recompiles when applying a bit of intelligence will save vast amounts of time. And if you work in a small shop that happens to sit on a several-MLoC project, then that means that a considerable part of the code is old, started out a decade ago as multiple small projects, where compilation speed never was an issue, and the dependency management is abominably bad.
So are you going to tell such a company to throw all this away and spend another decade re-writing it? Dunk: It was a small company, with less than a dozen developers working on a multi-MLoC project.
That's very different from hundreds of developers doing so: you cannot re-write anything from scratch, because you'd need years to do so. As much as I hated the idea, investing in distributed compilation was economically feasible, re-writing wasn't. Oh, and I inherited those interfaces. I changed a lot of that code to employ TMP, to find more errors at compilation, and less in the field.
First, why does it take so long to compile in the first place? Does your environment IDE, make, whatever support incremental builds? Make sure that you are only recompiling the changes, rather than the whole thing. If you have a multi-core machine, your IDE may support parallel compilation. I know for a fact that Visual Studio does that. Apparently so does gcc. So get a better machine, and enable parallel compilation.
Consider using precompiled headers. If you try all that, and compilation is still slow, review your code. Look for unnecessary dependencies. Are you including a header where a forward declaration would be sufficient?
Newsletter Topics Select minimum 1 topic. Operating Systems. Tags: Solaris. Anonymous August 1, 0 Comments. Hi All, My machine is getting very slow if more than one users compile concurrently. I really doubt if Forte 6. Thanks in advance, Himanshu. Anonymous Posted August 1, 0 Comments. Regards, Patrick Soltani.
Register or Login. Welcome back! Actually, any libraries in any languages e. Python, Node. I have seen an R library built in 20 minutes. Also, ConTeXt is very slow to build. Java and Scala, amongst compiled languages, can be very slow to compiled as well.
During the design of the Go language it has been a conscious decision to ensure compilation would be small. For more details look at this stackoverflow. Makes me think, why can't a language have both development compilation i.
I realized that there might be multiple languages tried after C, but before Go; but for some reasons, Go is quite successful. I don't think there is a reason it wouldn't be possible, it just need to be done and might have already been.
0コメント