<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 28 Feb 2019 at 00:28, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019 at 3:17 PM Leonardo Santagada <<a href="mailto:santagada@gmail.com" target="_blank">santagada@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto"><br></div></div><div dir="auto">Also we are investigating why we have 420 million types being linked while it appears that 95-99 % of them are not being used. De  anyone know if pch can help here? My feeling is not much as template instantiation still generates a ton of weak symbols on the pch users, but I might be confused.</div></blockquote><div><br></div><div>This probably has to do with the fact that most types are duplicates.  If there is a class Foo in a header file, and you include that header file in 100 different translation units, all 100 of them of them will get full type information for that class in its object file.  This is the /Z7 semantics that clang-cl implements.  The alternative is /Zi which uses a type server (out of process de-duplicater) to do this merging at compile time, which is what cl uses by default, and which clang-cl doesn't support. </div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Sorry that's what I meant, we generate 420 million type definitions that get de duplicated to less than 2 million.</div><div dir="auto"><br></div><div dir="auto">We use a distributed build system... We use /Zi saving to one pdb per file for fastlink or 100 pdbs for normal link, but then both compiling and building is slow.</div><div dir="auto"><br></div><div dir="auto">Maybe if we could make type server serve all distributed machines that could work, but I don't think mspdbsrv works like that.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div></div></div></div>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>Leonardo Santagada</div>