How to speedup xcode builds without any project modifications?

前端 未结 5 1597
囚心锁ツ
囚心锁ツ 2021-02-01 10:22

Last version or XCode (3.2.1) is running very slow on OS X 10.6.

What kinds of tweaks can you do to your Mac in order to speedup Xcode build process.

5条回答
  •  礼貌的吻别
    2021-02-01 10:34

    I think I may got Xcode to build at decent speed with this command:

    # Xcode 3.x
    defaults write com.apple.Xcode PBXNumberOfParallelBuildSubtasks 4
    
    # Xcode 4.x
    defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks 4
    

    This will limit the number of processes executed when it does build. Before adding this to my machine (4 cores/3GB RAM) the build process was slower than on single core!

    I think that XCode is not able to estimate the right limit of subtasks by itself because it does the estimate by looking only at your number of cores and ignoring the amount of RAM you have.

提交回复
热议问题