Thank you for purchasing through links and ads on this site.
diglloyd Deal Finder...
Buy other stuff at
Upgrade the memory of your 2018 Mac mini up to 64GB
128GB Memory in iMac 5K

Up to 128GB for 2019 iMac 5K!
Up to 64GB for 2015/2017 iMac 5K

Save nearly 50% over Apple pricing

Optimizing Developer Builds Performance

Software developers are always looking for a faster way to build their code. The answer to faster builds is surprisingly simple, but it does depend on the type of build.

Two very different types of builds are documented here.

Building the GlassFish V3 application server

The GlassFish V3 application server is an open-source Java EE enterprise server consisting of a large number of modules. Its build system is complex, based on the popular maven 2.0 environment. Yet it is more or less brain-dead in terms of exploiting system resources: it runs single-threaded for most of its invocation, though some internal threading does occur, making dual-core systems worthwhile.

I tested the GlassFish V3 build as of mid-December 2008. I did an initial build, which downloads all dependencies from internet maven repositories. I then repeated the following command five or six times, to verify consistency in results: "mvn clean; mvn -o install". The "-o" flat tells maven not to access the network; it builds locally.

The systems were clones of each other, and both used the same model Hitachi 320GB hard drive, so the runtime environment was nearly identical.

OWC Easy SSD Upgrade Guide
MacBook Pro and MacBook Air
iMac, Mac Pro, MacMini, more!


The results are striking: the fast Hitachi 320GB hard drive was just as fast as a RAM disk, and faster than any external eSATA solution. This is not too surprising, given Mac OS X caching, and the fact that builds do lots of small I/Os, which are not efficient for eSATA on the MacBook Pro, and do not benefit from the striped reads or writes from a RAID (32K stripe size).

Bottom line

(a) So long as the internal hard drive remains fast (not too full), builds will run at top speed without any special effort; a RAM disk (risky in the event of a crash) offers no meaningful help.

(b) External eSATA does not help and a striped RAID actually degrades performance.

(c) Build speed scale closely with CPU clock speed.

Build GlassFish V3
Configuration Build time (seconds)
MBP 2.4GHz, 4GB, internal drive 15% full 188
196, 185, 189, 183, 189
MBP 2.4GHz, 6GB, internal drive 15% full


191, 196, 196

MBP 2.4GHz, 6GB, eSata*


192, 195

MBP 2.4GHz, 6GB, eSATA stripe**

204, 202, 206

MBP 2.4GHz, RAM disk 187
186, 187, 187, 176
MBP 2.8GHz, 4GB, internal drive 14% full 154
156, 149, 157, 151, 155
MBP 2.8GHz, 4GB, eSATA stripe** 155
155, 154
MBP 2.8GHz, 4GB, RAM disk

150, 150, 150, 148, 150

* Single 1TB Western Digital RE3 via Sonnet SATA Pro, FirmTek SeriTek/2EN2 Details.

** Striped dual 1TB Western Digital RE3 via Sonnet SATA Pro, FirmTek SeriTek/2EN2 Details.

The MacBook Pro 2.8GHz (2008 unibody) showed a 22% performance advantage over the previous generation 2.4GHz model. But this is not very impressive: its clock speed is 17% faster, accounting for most of the difference; its faster memory and larger CPU cache must account for the rest. It means that a previous generation MBP at the same clock speed would perform at effectively the same speed, so get a refurbished at a huge discount while they last (late 2008/early 2009).

Building with Apple’s XCode

XCode is Apple’s integrated development environment. It is highly efficient, using all available CPU cores and fully exploits a quad-core Mac Pro at 400% CPU usage (an 8 core system would likely be fully exploited as well).

For this test, I built a universal binary DiskTester (32/64 bit for PowerPC and Intel), which means the entire application is built 4 times for the four combinations.

Bottom line: XCode scales linearly with the number of cores! Fast builds means as many CPU cores as possible. Build speed also scales ~linearly with the clock speed, but that is of minor importance relative to adding even a single extra core.

Build DiskTester 64/32 bit for Intel and PPC
Configuration Build time (seconds)
MBP 2.4GHz, internal drive 15% full 170
170, 171, 169
MBP 2.8GHz, internal drive 15% full

141, 141, 141

Mac Pro, RAM disk

73, 73

Mac Pro*

73, 73

Mac Pro, core #4 disabled 97
Mac Pro, cores #2, #4 disabled 146
Mac Pro, cores #2, #3, #4 disabled 283

* MacPro is 2006-vintage quad-core 3.0GHz

Which Camera System 📷 is Best?
Which Lenses to Choose?🌈

Avoid costly mistakes and get the ideal system for your needs: diglloyd photographic consulting.


For the GlassFish V3 build, the dominant factor is CPU speed, multiple cores are of little relevance due to the inefficiencies of its maven-based build.

For XCode, the dominant factor is the number of CPU cores, with CPU speed a secondary factor.

Apple MacBook 12-inch, Mid 2017 (Current Model)

$1599 Only $999

1.3 GHz i5, 8GB, 512GB SSD
Apple Refurbished, Factory Sealed, Apple 1 Year Limited Warranty

Save the tax, we pay you back, instantly!
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 21 hours unless noted. Certain deals may last longer.
$2797 SAVE $600 = 17.0% Nikon Z 7 Mirrorless in Cameras: Mirrorless
$2798 SAVE $400 = 12.0% Sony a7R III Mirrorless in Cameras: Mirrorless
$3498 SAVE $1000 = 22.0% Sony a9 Mirrorless in Cameras: Mirrorless
$898 SAVE $100 = 10.0% $164 FREE ITEMS Sony DSC-RX100 VA in Cameras: Point and Shoot
$1879 SAVE $1071 = 36.0% ZEISS 15mm f/2.8 Distagon T* ZE in Lenses: DSLR | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | Twitter
Copyright © 2019 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__