質問

I've started working on a project that has a shed load of imports in the pch file.

Why would someone do this? Lazyness?

I guess if I refactor them out, I could potentially decrease compile times..... is that so?

役に立ちましたか?

解決

No, not unless it's importing things that are changing frequently. The point of the precompiled header is that it combines lots of code that changes very infrequently into an intermediate format to decrease compilation times. If you take stuff out, it has to process each of the imports normally instead of using the intermediate format.

Taking things out of the precompiled header generally slows down the compile times. The exception to this is if you are importing stuff that you are changing on a regular basis, as this would defeat the purpose of it by forcing it to compile it each time.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top