Speed Up Project Builds In Eclipse

Enabling fast builds on eclipse

In this post I will give you some tips which will help address some of the issues which slow down the compile times greatly, in eclipse (or some other IDEs and compilers). Using these tips you can speed up your build times greatly.

 

1. Speed up by enabling Multi-threading in eclipse

Biggest issue due to which we have to face slower builds is not utilizing the power of modern day CPUs. These CPUs have got multiple threads and if you are not using all of them you are wasting some of your time. By default eclipse compiles your projects using single thread, and in most cases the default behavior is left as is, without any changes and hence most of the people are living with slow builds times.

All you have to do in order to enable multi-threaded builds, go to the project properties and click the C/C++ Builder settings and then enable parallel builds. Once you have enabled parallel builds, your builds will speed up at least twice.


 

2. Speed up by Disabling Antivirus

One more issue that seriously slows down build process is that antiviruses continuously scan the source files, build processes as well as the built files. Especially now that we have enabled parallel builds antivirus scanning is going to be more of a problem for us. But the best part is we could disable the antivirus anytime. Its won’t be much of a risk as we are mostly playing with source files instead binaries (provided your build system itself is not backdoored :S). Even better is that most antiviruses have got some kind of exception list or ignore list. You could add your IDE folder, source folders and compiler folders to the exception list. This will speed up your build process at least twice. In some cases adding folders to exception list may not work and some antiviruses still keep scanning but won’t report if something is wrong with exception-ed folders.

 

3. Speed up by using more RAM for eclipse process

We have enabled parallel builds and disabled our antivirus, but it will do us no good if there is not much ram to be used. Especially if you are not using SSD. Eclipse is notorious for using huge amounts of ram to function properly and smoothly. So, to cope up with this you got to give at least 1.5 GB of memory to eclipse to stay smooth and fully utilize processor power.

猜你喜欢

转载自blog.csdn.net/fz835304205/article/details/72771230