4 ms·
I don't care very much about the MSVC bugs. The problem is that compiler is very slow. Our 800 c++ files project takes 25 minutes to compile with MSVC, and 15 m
by samsaga2 4y ago
I don't care very much about the MSVC bugs. The problem is that compiler is very slow. Our 800 c++ files project takes 25 minutes to compile with MSVC, and 15 minutes with clang (Windows 10 with antivirus disabled and using cmake+ninja).
- wyldfire 4y agoHave you tried ccache btw? I don't know if it works with MSVC, but I think it should.
- w4rh4wk5 4y agoDespite not knowing anything about your code base, I recommend giving pre-compiled headers a try. I am currently working on a game + custom engine that is around 1M lines of C++ code. Thanks to pre-compiled headers and forward declarations, I can compile all of it in under 20 seconds (full rebuild, optimizations enabled). AMD Ryzen 9 7950X 16-Core Processor All code is stored on an NVMe drive, Windows Defender realtime protection is disabled. There's also a way to profile your build process with MSVC. It seems a bit daunting at first, but it's actually not that complicated: https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/ https://devblogs.microsoft.com/cppblog/introducing-c-build-i...
- jahnu 4y agoYes! Pre compiled headers are an absolute must have for any large enough project in msvc. Well worth the effort.
- zone411 4y agoHmm that seems excessively slow. I'm assuming you're using multithreaded compiling and SSDs? Any huge libraries? I'd try Build Insights. It seems worth investigating because 800 source files is not really that many.
- samsaga2 4y agoShitty computer plus SDD almost full. I have tried cmake target_precompile_headers, but it doesn't seem to work correctly with some third vendor libraries we are using (precisely the largest ones).
- criddell 4y agoIf this is for a business, why not replace the computer? If you can save a lot of time per build it shouldn’t take very long for a new computer or upgraded SSD to pay for itself.