{"id":35670,"date":"2022-04-25T17:27:53","date_gmt":"2022-04-25T21:27:53","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=35670"},"modified":"2022-04-25T17:27:53","modified_gmt":"2022-04-25T21:27:53","slug":"how-ram-affects-xcode-compilation-speed","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/04\/25\/how-ram-affects-xcode-compilation-speed\/","title":{"rendered":"How RAM Affects Xcode Compilation Speed"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/cocoawithlove\/status\/1517736163318009856\">Matt Gallagher<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/cocoawithlove\/status\/1517736163318009856\"><p>Xcode alone can fill the RAM on a 16GB system. Yeah, okay, half of that is &ldquo;Cached Files&rdquo; (not app memory) so the effect is subtle. Incremental builds are 5% slower compared to a 32GB system but clean builds are about the same. (Blue is 16GB, green is 32GB, lower is faster.)<\/p><p>Everything takes different amounts of RAM based on the total RAM of the system. My 16GB system running Xcode shows 8GB &ldquo;Memory Used&rdquo; in Activity Monitor but the 32GB system shows 12GB. (The Xcode process shows just 586MB used, the rest spread around 822 other processes.)<\/p><p>Simulator + SwiftUI previews and all the RAM on a 32GB machine is used. Now, the 32GB machine beats the 16GB one by 10% or more. Don&rsquo;t be too worried if you can afford only 16GB since the difference is never more than 25%, even with a standard spread of apps in the background.<\/p><p>Without a stopwatch, I can&rsquo;t tell the two apart &#x2013; both systems have been equally responsive. But now I&rsquo;ll add a Parallels Windows VM in the background. An easy 30% performance win to the 32GB machine. Worse: the 16GB machine noticeably stalls when swapping between apps.<\/p><p>Do you need 32GB for iOS dev? No, but memory up to 32GB is rarely <em>wasted<\/em> when IDEs are involved, even the difference is subtle.<\/p><\/blockquote>\n<p>He measured this using an Intel MacBook Pro.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/04\/08\/upgrading-to-a-14-inch-macbook-pro-with-a-studio-display\/\">Upgrading to a 14-inch MacBook Pro With a Studio Display<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/03\/21\/m1-ultra-mac-studio-compilation-benchmarks\/\">M1 Ultra Mac Studio Compilation Benchmarks<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Matt Gallagher: Xcode alone can fill the RAM on a 16GB system. Yeah, okay, half of that is &ldquo;Cached Files&rdquo; (not app memory) so the effect is subtle. Incremental builds are 5% slower compared to a 32GB system but clean builds are about the same. (Blue is 16GB, green is 32GB, lower is faster.)Everything takes [&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":"2022-04-25T21:27:56Z","apple_news_api_id":"2eb82eee-4c1a-4833-908d-e482ccf671b6","apple_news_api_modified_at":"2022-04-25T21:27:56Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ALrgu7kwaSDOQjeSCzPZxtg","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":[30,100,2077,138,71,1056,901,1812,226],"class_list":["post-35670","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-mac","tag-macbookpro","tag-macos-12","tag-optimization","tag-programming","tag-ram","tag-swift-programming-language","tag-swiftui","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35670","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=35670"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35670\/revisions"}],"predecessor-version":[{"id":35671,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/35670\/revisions\/35671"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=35670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=35670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=35670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}