<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="">Improving incremental mode<br class="">==========================<br class=""><br class="">Another area that could use work is the incremental compilation logic in the driver -- that is, reducing the number of times a file is rebuilt when it "doesn't need to be" -- and some of the documentation and driver-level counters mentioned above provide insight into that (eg. <a href="https://github.com/apple/swift/blob/master/docs/CompilerPerformance.md#driver-diagnosis" class="">https://github.com/apple/swift/blob/master/docs/CompilerPerformance.md#driver-diagnosis</a>). Incremental compilation is based on approximating the "true" dependency graph and sometimes this approximation is too coarse; but changing this will be a large amount of work, and the nature of a substantial change to that is still subject to a lot of analysis and design. In the meantime there may also simpler bugs lurking in the dependency-analysis logic, within the current dependency approximation; I'd be happy to help anyone who wants to spend time bug-hunting in this area understand what they're looking at.<br class=""></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Has any thought been put into taking advantage of <b class="">llbuild</b><span class="Apple-converted-space"> </span>for dependency graphs? Can some performance improvements come from that?</div></div></blockquote></div><br class=""><div class="">Long term I think there's general interest for leveraging it, in place of the miniature build system inside the swift driver; but the discovery/analysis or dependencies and the scheduling/executing of jobs are somewhat separate tasks, and llbuild only does the second. The mapping from a set of swift declarations-and-files into a dependency graph that is a safe (but tight) approximation of the "true" dependencies of the compiler is the hard part. That is, the material that goes into a .swiftdeps file is the hard part; and unfortunately that's a thing build systems delegate to compilers to figure out, since it involves tracing the compiler's internal activities, as it runs each job.</div><div class=""><br class=""></div><div class="">-Graydon</div><div class=""><br class=""></div></body></html>