This is the story of how ’s made me care about my code’s compilation time. Travis-CI 50 minutes build timeout Install the , add to your Podfile, your code, for your dependencies and spend less time compiling. TL:DR: Build Time Analizer this fix make PRs Travis CI’s struggle Travis CI as CI platforms, offers a free tier for open source, but not without its limitations. In the specific case of Travis, the limitation is a . many other 50 minutes build time out I understand the server costs for providing such a great tool for open source projects, but this limitation appears to exist on as well (the paid version of Travis CI). Travis-CI.com Although this is a non-issue for testing huge frameworks such as (with 997 tests) or (with 1508 tests), the same cannot be said for testing/deploying actual applications with a lot of dependencies and/or a huge code base. RxSwift ReactiveCocoa SwipeIt as study case SwipeIt — Reddit with a swipe For the past few months I’ve been developing as part of a benchmark into and in development (you can read more about this on ). SwipeIt MVVM MVC iOS another Medium story is a like app for where you have to either upvote or downvote a link to move on to the next the link. SwipeIt Tinder Reddit For reference_, SwipeIt_ has around 10 dependencies on the unit testing target, compiles 72 files (of which 16 are ) and copies 20 bundle resources (including files and ). .swift specs JSON HTML As for the actual application target, it has 28 dependencies, compiles 132 files and copies 6 bundle resources. .swift The on Travis took 14 minutes and passed 77 tests. Out of those 14 minutes only were spent on actual testing while the rest was spent on building the required files. last (unoptimized) successful test run 2.4 seconds In comes the deploy This is where things get tough in terms of build time. Whereas unit testing runs on a build setting, any deployments to , or should run on a build setting. This leads to an actual of both shared dependencies and code being tested. DEBUG Fabric Testflight HockeyApp RELEASE 2x build time increase Jack Bauer meme, circa 2004 As can be seen in , a and strategy was taking a little over the 50 minutes threshold. Travis-CI’s build history test deploy Swift and the Build Time Analyzer Swift has been known to have some compile time issues in regards to Type-Inference, Nil Coalescing Operator, Casts, Lazy Properties and a few others (for more information check out and ) . this awesome post its followup With the we can easily understand which parts of our code are taking the longest to compile. Build Time Analyzer SwipeIt’s Build Time Analyzer Although the BTA does help in debugging what I might be doing wrong, most of the compile time is actually spent on dependencies. Adding the code above to your will make sure you can the will also analyze your dependencies. Podfile Build Time Analyzer Cocoapod Saving the world one PR at a time At the time I found out that most of my compile-time was spent on two popular libraries, and . GPUImage2 ObjectMapper As can be seen on my two pull requests and , a lot of time can be saved by working around ’s compiler problems. here here Swift Although saving on and on might seem irrelevant, these metrics were obtained on the most recent Macbook Pro Retina 13-inch. Not everyone using these libraries has such a powerful laptop at their disposal and especially not CI platforms where those seconds might actually turn into minutes. 1 second ObjectMapper 9 seconds GPUImage2 In the end, I got to only take 7 minutes for and 33 minutes with a + task by optimizing my code, isolating the test target and tweaking my configs. SwipeIt Testing Test Deploy on Travis-CI Fastlane My clean builds are also taking a lot less :) P.S.