There are many questions on SO about improving the build time in Visual Studio (cf. here , here , etc.), but the vast majority of answers are aimed at projects which are fairly large. Many of these answers (eg increasing amount of parallel builds) will only have a marginal effect on small projects, which is what motivates this question.
I am using Visual Studio Express 2015 with one solution, a single C++ project, containing only three files: an 800-line source file, and two .h files. I am running on Windows 7, my processor is Intel Core i5, CPU 2.60GHz, RAM 8GB.
My build time is a staggering 1 minute or more.
Based on suggestions in other SO threads, I have emptied my %temp% and prefetch directories, but this only had a marginal effect. I changed my code to remove as many warnings as possible. I removed all the unnecessary files from the VS directories for my project. My antivirus is disabled.
Here and here it was suggested that an SSD could help. I find it hard to believe, however, that my performance should be this poor with HDD.
I would be glad to hear any suggestions about this issue. Thank you in advance.
Some things you can do (not all may be relevant to your code):
Remove unneeded includes.
Build without optimization except for when doing release builds.
Use extern templates where possible.
Split your code into multiple source files so that only a subset of it needs recompilation when you make changes.
Use precompiled headers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.