Speeding Up Slow Swift Build Times
Nick O'Neill ☎️ 🇺🇸
1025

Interesting post. I have a project which takes too long to compile too. Found some issues of my own using this technique. I have for example subclassed UITextField where I’m overriding intrinsicContentSize(). On the first line I do:

if isFirstResponder() {

Result: 4929.3ms CMExpandingTextField.swift:18:19 @objc override func intrinsicContentSize() -> CGSize.

That’s 5 seconds for one line of code. I’m sure I can find other places where it gets stuck too.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.