Xcode Build Optimization – Exhaustive list of ways to speed up your Xcode build(blog.flexiple.com)
blog.flexiple.com
Xcode Build Optimization – Exhaustive list of ways to speed up your Xcode build
https://blog.flexiple.com/xcode-build-optimization-a-definitive-guide/
16 comments
This is Hacker News, not Hacker Noon.
"Definitive Guide"..."Exhaustive"? Really? So why do I only find tips like changing from debug to release, or enabling 'Parallel build' which is enabled by default? And no mention of ccache? It's as simple as
I suggest people who are upvoting this actual look at the contents. I'm by no means an expert, but I found this "definitive guide" worthless. My guess is the author was learning how to use Xcode and these are his notes.
$ brew install ccache
Which will drop partial compile times from minutes to seconds.I suggest people who are upvoting this actual look at the contents. I'm by no means an expert, but I found this "definitive guide" worthless. My guess is the author was learning how to use Xcode and these are his notes.
Presumably bots, like this other submission of op:
https://news.ycombinator.com/item?id=20361463
https://news.ycombinator.com/item?id=20361463
I believe Swift occasionally has problems with type inference. If you time your builds and functions then you'll see where you need to add an explicit type.
I've also noticed image and color Assets take a while for an initial build.
For example, this little app of mine takes 25 seconds for a full build, and less than 1 second for an incremental, probably due to the 100 pictures.
https://apps.apple.com/us/app/hundred-words/id1469449237
I've also noticed image and color Assets take a while for an initial build.
For example, this little app of mine takes 25 seconds for a full build, and less than 1 second for an incremental, probably due to the 100 pictures.
https://apps.apple.com/us/app/hundred-words/id1469449237
Interesting points. Will give this a try myself.
Does it require any additional configuration?
It would be great if this list would include Buck or Bazel and their associated HTTP caches. For us we lowered our clean CI build times from 22 minutes to 4.5 minutes (1 million lines of Swift)
That is something! TODO - research and write about Buck/ Bazel.
This is a decent sample project to start with: https://github.com/airbnb/BuckSample
Great! This is helpful :)
> If you’re not doing a great deal of debugging, it is better to set this to ‘Optimize for Speed’. This will eventually reduce the build time as the compiler will omit the steps of attaching values to the debugger thread.
I would expect this to increase build times.
I would expect this to increase build times.
It actually does reduce build time. Screenshots of the same for the sample project are shown just below.