Regardless of whether I've changed any code or
not, the XCode build
goes in a few seconds sometimes and other times takes a minute or
two... any idea what might be holding up the script? Thanks,
I have not measured this, but I think that the variability may be due
to whether or not the VM system drops the xcodebuild executable (+
frameworks) from RAM between runs. I've observed that if I do a number
of quick build-run-edit cycles in a row, it tends to be fast. If do a
build and then perform a lot of memory intensive activities, the next
build takes longer.
The Xcode app itself may have an advantage here in that the Xcode
frameworks don't need to be reloaded every time (and it can cache data
structures that xcodebuild would need to rebuild every time).