https://issues.dlang.org/show_bug.cgi?id=14431
--- Comment #14 from [email protected] --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c14fadca403a61a578795ec0fb71f9340c7b543 fix Issue 14431 - huge slowdown of compilation speed In the pull request #4384, all instance has been changed to invoke semantic3(). It was for the link-failure issue in specific case, but it was too excessive. 1. Semantic analysis strategy for template instances: We cannot determine which instance does not need to be placed in object file until semantic analysis completed. Therefore, for all templates instantiated in root module, compiler should invoke their semantic3 -- regardless of whether those are also instantiated in non-root module. If a template is _only_ instantiated in non-root module, we can elide its semantic3 (and for the compilation speed we should do that). 2. Code generation strategy for template instances: If a template is instantiated in non-root module, compiler usually does not have to put it in object file. But if a template is instantiated in both of root and non-root modules which mutually import each other, it needs to placed in objfile. https://github.com/D-Programming-Language/dmd/commit/92fcc9da72e2889406031a34d9a5d22b075f7d50 Merge pull request #4944 from 9rnsr/fix14431 [REG 2.067.0] Issue 14431 - huge slowdown of compilation speed --
