{"id":27391,"date":"2019-11-26T15:14:42","date_gmt":"2019-11-26T20:14:42","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=27391"},"modified":"2019-11-26T15:14:42","modified_gmt":"2019-11-26T20:14:42","slug":"slow-xcode-11-objective-c-builds","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/11\/26\/slow-xcode-11-objective-c-builds\/","title":{"rendered":"Slow Xcode 11 Objective-C Builds"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/liscio\/SubFrameworks\">Chris Liscio<\/a>:<\/p>\n<blockquote cite=\"https:\/\/github.com\/liscio\/SubFrameworks\"><p>When I build my app, Xcode 11 appears to stall out completely (dropping from full core usage down to 10-20% CPU) during the Objective-C build phases.<\/p>\n<p>[&#8230;]<\/p>\n<p>The bug manifested for me like this:<\/p>\n<ol>\n<li>Starting with a clean <code>DerivedData<\/code> folder, I can build my app, <a href=\"https:\/\/supermegaultragroovy.com\/products\/capo\">Capo<\/a> in about 60 seconds, flat.<\/li>\n<li>Once I clean the build folder using command-shift-K, <em>all subsequent builds<\/em> will take anywhere from <em>180s<\/em> to <em>500s<\/em> (in the very worst case, which I&rsquo;ve not seen for a while now.)<\/li>\n<\/ol>\n<p>After some back &amp; forth with Apple&rsquo;s engineers, I learned to turn on <code>clang<\/code>&rsquo;s <code>-Rmodule-build<\/code> flag to see what&rsquo;s going on behind the scenes. It turns out that&mdash;for every Objective-C file that is built&mdash;framework modules are being re-built unnecessarily.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Chris Liscio: When I build my app, Xcode 11 appears to stall out completely (dropping from full core usage down to 10-20% CPU) during the Objective-C build phases. [&#8230;] The bug manifested for me like this: Starting with a clean DerivedData folder, I can build my app, Capo in about 60 seconds, flat. Once I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-11-26T20:14:47Z","apple_news_api_id":"7d57852e-7dc0-43f5-80ac-30d9f2ce1493","apple_news_api_modified_at":"2019-11-26T20:14:47Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AfVeFLn3AQ_WArDDZ8s4Ukw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,230,30,1666,54,71,226],"class_list":["post-27391","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-clang","tag-mac","tag-macos-10-15","tag-objective-c","tag-programming","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=27391"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27391\/revisions"}],"predecessor-version":[{"id":27392,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/27391\/revisions\/27392"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=27391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=27391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=27391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}