4 ms·
It's also useful to profile your compile times. Sometimes the compiler is spending most of its time on some small sections of code. For instance, I was workin
by skohan 7y ago
It's also useful to profile your compile times. Sometimes the compiler is spending most of its time on some small sections of code.
For instance, I was working on a project where the use of one library constituted 80% of our compile time! The library allows you to declare autolayout constraints using operator overloads (i.e. `foo.top == container.top - 20`) and apparently the amount of type inference was just murdering our compile times. Changing libraries took this project from being awful to work on to quite pleasant.
- ajconway 7y agoSwift also provides a compiler option specifically for debugging long compilation times: "-Xfrontend -warn-long-function-bodies=100"
- gbrhaz 7y agoAh, Cartography. Works great in a small project. We ended up moving to standard anchors for almost everything, with some helper methods to handle things like pinning to superviews.