Reducing Swift Compile Time
Spent the morning cutting our Swift compile time by ~3 min. Thanks @irace for the helpful blogpost!
Basically had to go back & change most of our NSLayoutConstraint.activate to isActive = true. Uglier, but it really added up over time…
Unfortunate thing is that isActive = true is slower at runtime, so we’re trading off compile time with run time :/
I just tried it. Turns out
{ $0 == "e" || $0== "E" }takes 100ms more than
{ (c: Character) in c == "e" || c == "E" }
Previously: Speeding Up Slow Swift Build Times.