Re:Building a Production Server Swift App
by rudedogg on Monday December 19, 2016 @06:41PM
(#13216028)
I don't think that's how whole module optimization works. From what I understand it slightly slows down compilation, but you end up with more performant apps. For this reason I think it's only used for Release builds (that's how I have it setup).
Re:Building a Production Server Swift App
by Aker89 on Monday December 19, 2016 @03:01PM
(#13214533)
can also recommend this approach at the moment: http://khanlou.com/2016/12/guarding-against-long-compiles/
This makes XCode warn you about functions with long compile times.
Wow, just what I needed! I posted a rant a few days ago here where I advocated for just this thing!
Re:Building a Production Server Swift App
by codesternews on Monday December 19, 2016 @05:28PM
(#13215578)
Thanks!! Done already all this. On developer forums apple developers said they messed with the Xcode so wating for next Xcode release. That's what I am talking about :(
https://forums.developer.apple.com/thread/62737
Xcode only lets you do WMO & optimizations on in the normal UX. Really bad that they don't expose this :/
Also to other people thinking about swift: don't. 200-100kloc and your build times become 5-20+ minutes. The conditional compiler is not very good either. And once your at that level of code, xcode spins it's indexer for a long time, autocomplete fails a lot and the debugger just doesn't work that well. Printing an object just spins for over a minute, and often it fails to even print the variable. Also configuring your project into many modules become painful with all the targets you have to manage.
Maybe in 4+ years when the language has matured enough and these issues start going away? And you have a build system that doesn't depend on large multimegabyte xml files that can't be written by a human. But for now, no.
It's good enough for a couple of developers doing contract apps although!