Monday, July 25, 2011

2011 11" MacBook Air vs. 2011 15" MacBook Pro Xcode Performance

I just picked up the just released 2011 11" MacBook Air in the hopes of using that to replace my 2011 15" MacBook Pro. In the event it didn't perform well enough it would be given to the wife (actually, this was the original plan anyways, so if it can be a decent development machine, all the better)...

Here are the specs (Both with Lion and Xcode 4.2 and iOS 5 Beta 4).

  1. Decked out 2011 11" MacBook Air
    1. 1.8Ghz Core i7
    2. 256GB SSD (The faster Samsung one)
    3. 4GB Memory
  2. Decked out 2011 15" MacBook Pro
    1. 2.3GHz Core i7
    2. 400GB SSD (OWC w/SandForce, not OEM)
    3. 8GB Memory

For me the only thing that matters is Xcode performance. I just a project with the following characteristics, and measured a build from the time of pushing play to the time of the simulator launching with the login on the build displayed.

  1. 224 Source Files
  2. 63 XIB's
  3. 419 Resources
Here are the results:
  1. Clean Build
    1. MacBook Air: 38 seconds
    2. MacBook Pro: 16 seconds
  2. Repeat Build (No Clean, Simulator Left Running)
    1. MacBook Air: 8 seconds
    2. MacBook Pro: 8 seconds
It was expected the MacBook Pro would be faster. From a clean build it's significantly faster. From an existing build where you're touching a few files Xcode indexing to know what's changed or not makes it a wash. As most of the time we're just changing a couple files at a time the MacBook Air seems fast enough for development, just knowing that the clean build will take almost twice as long.

Also, to explain the difference, the actual copying of resources, launching the simulator, etc. took about the same time. There was a moderate difference in the compilation time, but the static analysis is where the MacBook Air lost out. The MacBook Pro killed it with the extra two cores and processor speed.

Now, the debate... I think I'm going to try out the MacBook Air and see how it goes...

UPDATE: After using the MacBook Air I decided to stick with the MacBook Pro. That extra speed really matters when someone is looking over your shoulder. Particularly, at a client. Although, if you are used to a non-SSD MacBook Pro (particularly, the 2010 variety) you'll be happy with the performance of the Air.

Thursday, July 21, 2011

OSX Lion and Xcode 4.1

We've upgraded to OSX Lion and Xcode 4.1 and it has been an interesting process. Here's the steps we took.
  1. The first was to make sure we were upgraded to 10.6.8 before we started anything.
  2. Purchase and download OSX Lion from the App Store (Note, you before starting the installation you may want to create a bootable drive)
  3. Install OSX Lion
  4. Java is not installed by default, so after Lion is installed you can install Java by going to a Terminal and typing "java -version" and it'll start a download to install Java.
  5. Before installing Xcode 4.1 it's good to remove any previous versions of Xcode
    1. Uninstall any previous Xcode by issuing a "sudo /Developer/Library/uninstall-devtools"
    2. In ~/Library issue a "find . -name *Xcode*" and remove each file/directory
    3. In ~/Library issue a "find . -name *Simulator*" and remove each file/directory
    4. Reboot
  6. Next find Xcode 4.1 on the App Store and download and install it. This just installs the installer. You then have to install it. The installer can be removed when you're finished.
  7. If Xcode launches with errors or has no menu times you'll need to reinstall iTunes. The download has the 64-bit universal builds now.
The only issue we've seen is that Core Location isn't working in the simulator and generates an error. See our post on the developer forums.