There’s a pending review, https://reviews.llvm.org/D69585, which greatly speeds up building of codebases using PCH + heavy use of templates.
Previously, template instantiations would only happen at the end of the TU which includes the PCH. I’ve seen codebases with 5+ sec spent in each TU because of this.
With this patch, instantiations are allowed to happen at the end of the PCH, which shaves a few seconds in each TU including the PCH. This behavior is behind a new flag.
It would be much appreciated if anybody knowledgeable of the subject could take a look at this please?
Many thanks in advance!