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.