<div dir="ltr">I haven&#39;t been able to synthesise a project where this reproduces that badly *yet*. Anyways I&#39;ve filled <a href="https://bugs.swift.org/browse/SR-2461">https://bugs.swift.org/browse/SR-2461</a> with some more info in case it helps.<div><br></div><div>Thanks!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-22 21:47 GMT+01:00 Michael Gottesman <span dir="ltr">&lt;<a href="mailto:mgottesman@apple.com" target="_blank">mgottesman@apple.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Aug 19, 2016, at 9:23 PM, Diego Sánchez via swift-users &lt;<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>&gt; wrote:</div><br><div><div dir="ltr">Hi all,<div><br></div><div>We&#39;re suffering from very long Swift compilation times in our project. Each file takes ~1 second to compile (-Onone), (measured with xctool -jobs 1), which is hitting our development experience as we keep adding swift code (~350 .swift files) :(</div><div><br></div><div>I&#39;ve gone through all the googling already and the debug-time-function-bodies thing, but I didn&#39;t find any particular function taking too long. However, I did notice:</div><div> a) Each file takes more or less the same amount of time to compile (~1 second), even for very simple files.</div><div> b) Each &quot;swift -frontend -c&quot; command with the debug-time-function-bodies dumps basically the same info for each file, which is around 1500 lines. Most of the times are 0.0ms, and the total sum for a random choice gave me 167.3 ms, far away from 1 second</div><div><br></div><div>From a) and b) looks like the same heavy operation is being performed for each file (type checking?) and that this heavy operation grows with the size of the project. Would it be possible to do this upfront and not pay for it in every file? Basically, if I have 3 classes in one file it will take 1 second to compile them but if I do 1 file per class then it will be 3 seconds :(</div><div><br></div><div>I&#39;d like some input to whether my assumption is correct and suggestions on how to improve the compilation time, apart from splitting the code into smaller frameworks. Can I expect improvements with Swift 3 or future releases? (I tried migrating a small framework to Swift 3 and didn&#39;t see a big difference)</div></div></div></blockquote><div><br></div></span><div>Do you have a small example of this? Can you file a bug on <a href="http://bugs.swift.org" target="_blank">bugs.swift.org</a>?</div><div><br></div><div>Then we can look at your specific example.</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Cheers,</div><div>Diego</div><div><br></div><div><br></div></div>
______________________________<wbr>_________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-users</a><br></div></blockquote></div><br></div></blockquote></div><br></div>