<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 5, 2017, at 10:01 PM, Michael Zolotukhin <<a href="mailto:mzolotukhin@apple.com" class="">mzolotukhin@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Dec 5, 2017, at 9:38 PM, Chris Lattner <<a href="mailto:clattner@nondot.org" class="">clattner@nondot.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I, for one, want faster builds.</div></div></blockquote>Good, we have at least two people on board then :)<br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Beyond that though, this seems like obvious goodness to reduce coupling in the codebase. I’ve only skimmed the patch, but this seems like a clearly amazingly great ideas. Did you use the IWYU tool or something else?</div></div></div></blockquote>I tried using it, but while it gave me some interesting hints, I stopped using it when the build broke after the proposed changes. Probably, I could’ve figured out what went wrong and made it work, but I also noticed that the proposed by IWYU changes are much more intrusive - i.e. it tries to forward declare symbols, analyze include chains and leave only the last include etc (and it only would work if one applies the changes to all affected files at once). While these all are good ideas, I'd expect some objections against mechanical application of such clean-ups. Plus the patch would be much less obvious.</div><div class=""><br class=""></div><div class="">So, instead, I implemented a light-weight version of it that just tries to remove #include lines, making the footprint of this cleanup local. As a result, here I get a patch consisting of many independent changes (it can be applied per file and everything should work fine). More details of how that was done is in “Methodology” section in the end of the original e-mail.</div></div></div></blockquote><br class=""></div><div>Got it. I’ve never used IWYU, but those ideas sound like they could lead to further improvement. It sounds like the right thing is to get your basic patch set in, then explore where IWYU can do anything useful above and beyond that.</div><div><br class=""></div><div>If the gains are immeasurable and a PITA to work with, then it can easily be dropped. If it leads to a few significant wins, it could be worth playing with.</div><div><br class=""></div><div>In any case, thank you for working on this!</div><div><br class=""></div><div>-Chris</div><div><br class=""></div><br class=""></body></html>