[swift-users] Need help with compile times (type inference?)

Jordan Rose jordan_rose at apple.com
Mon Jan 25 13:41:43 CST 2016

I commented in the bug, but I'll reply here too: this was a debugging tool added for us, and isn't really ready for the average Swift user. In particular:

- It does a pretty lousy job of identifying functions without names
- It doesn't include type-checking of expressions not in function bodies, like initial values for properties
- It only has a (very basic, unsorted) human-readable output form, instead of something properly tabular
- It can only dump to stderr
- It's only function-granular, not statement-granular
- It only includes statement/expression type-checking (though admittedly that's the part of the compiler most likely to have runaway growth)
- It doesn't provide any guidance on how to make things better

I'd rather not commit to providing this feature "publicly" until these problems are at least addressed, if not fixed.

(I'm fine with letting people know about the debug option. I just don't want to consider it an official, supported feature of Swift.)


> On Jan 23, 2016, at 20:21, Daniel Dunbar via swift-users <swift-users at swift.org> wrote:
> It occurs to me that we should just get SwiftPM to have a feature to aggregate and report that data automatically:
>  https://bugs.swift.org/browse/SR-608
> This would be a decent package manager starter bug, I'm guessing it isn't all that much work.
> - Daniel
>> On Jan 23, 2016, at 4:03 PM, Joe Groff <jgroff at apple.com> wrote:
>>> On Jan 23, 2016, at 3:56 PM, David Turnbull via swift-users <swift-users at swift.org> wrote:
>>> I get the impression that there's no immediate solution. Will Swift 3.0 improve build times?
>> We hope so. Joe Pamer just landed some improvements into the master branch that should improve a lot of common cases, and I believe more improvements are on the way. In the meantime, Bryan Irace recently wrote an article that might help, about using some of the compiler's internal debugging flags to find and improve problem points: http://irace.me/swift-profiling/
>> -Joe
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160125/210ded5a/attachment.html>

More information about the swift-users mailing list