Why do pre-compiled headers make my build take longer?
I just tried using a pre-compiled header for a large C++ build on Solaris to try to speed it up, but it ended up slowing it down (from ~94 mins to ~111 mins).
The method I used was to get a list of all 3rd party header files used in the project and stick them in 3rdParty.h which I pre-compiled and then I just changed the Makefiles to add -include path/3rdParty.h to all the g++ lines. This way I didn't have to change hundreds of .cpp files.
Is this the wrong way to use pre-compiled headers?
Why does this take longer?