{"id":44843,"date":"2024-09-12T14:40:14","date_gmt":"2024-09-12T18:40:14","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=44843"},"modified":"2025-05-23T15:40:00","modified_gmt":"2025-05-23T19:40:00","slug":"swift-build-times-and-module-verification","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/09\/12\/swift-build-times-and-module-verification\/","title":{"rendered":"Swift Build Times and Module Verification"},"content":{"rendered":"<p><a href=\"https:\/\/pfandrade.me\/blog\/swift-build-times-and-module-verification\/\">Paulo Andrade<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pfandrade.me\/blog\/swift-build-times-and-module-verification\/\">\n<p>Secrets&rsquo; build time must have gotten slower and slower without me really noticing it&#8230; until Xcode&rsquo;s 16 betas, where I felt I really needed to understand what was going on.<\/p>\n<p>[&#8230;]<\/p>\n<p>The compiler is clearly spending most of the 3.5 minutes it took to build Secrets on verifying modules[&#8230;] This all sounds good and dandy, especially if you&rsquo;re distributing a framework, but I clearly don&rsquo;t want to be doing this in Secrets on <em>every<\/em> build!<\/p>\n<p>[&#8230;]<\/p>\n<p>This tweak brought down the build time from 3.5 minutes to 52 seconds &#x1F62E;!<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/09\/12\/xcode-16\/\">Xcode 16<\/a><\/li>\n<\/ul>\n\n<p id=\"swift-build-times-and-module-verification-update-2025-05-23\">Update (<a href=\"#swift-build-times-and-module-verification-update-2025-05-23\">2025-05-23<\/a>): <a href=\"https:\/\/x.com\/mpweiher\/status\/1925105690483274097\">Marcel Weiher<\/a>:<\/p>\n<blockquote cite=\"https:\/\/x.com\/mpweiher\/status\/1925105690483274097\"><p>Well that was 10 seconds of checking well spent:  recently, builds of my apps started to take ~30 seconds after a 1 line change.<\/p><p>Without any Swift in sight!<\/p><p>Checked the build logs and it turns out that &ldquo;verify modularization&rdquo; phases for two new frameworks are 10-15s each!<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Paulo Andrade: Secrets&rsquo; build time must have gotten slower and slower without me really noticing it&#8230; until Xcode&rsquo;s 16 betas, where I felt I really needed to understand what was going on. [&#8230;] The compiler is clearly spending most of the 3.5 minutes it took to build Secrets on verifying modules[&#8230;] This all sounds good [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-09-12T18:40:17Z","apple_news_api_id":"c0d74b03-adff-4c05-ac1e-d0be85361d4d","apple_news_api_modified_at":"2025-05-23T19:40:03Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/AwNdLA63_TAWsHtC-hTYdTQ","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":[255,30,2385,138,71,1849,901],"class_list":["post-44843","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-compiler","tag-mac","tag-macos-14-sonoma","tag-optimization","tag-programming","tag-secrets","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44843","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=44843"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44843\/revisions"}],"predecessor-version":[{"id":47846,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44843\/revisions\/47846"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=44843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=44843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=44843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}