Sometimes code finds its way on to my teams dev branch that compiles very slowly. When this gets to the point where it's several minutes long we've no choice but to drop our tasks and search for what caused this else we'd lose a lot of time until we resolve it.
For our apps performance we have unit tests to stop our users experiencing slow times, I'm wondering if it's possible to device a test where slow compile times will cause our tests to fail so the changes that cause slow compiles times can be identified and removed immediately before they waste the entire teams time.
You can add in your project's Build Settings -> Other Swift Flags the following flag: -Xfrontend -warn-long-function-bodies=<time>
where in <time>
you specify the amount of ms. You'll then be able to see warnings for any function that takes more time and fix them.
It's not gonna fail your tests but the whole team will be aware when they code something that takes too long to compile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With