Search code examples
titaniumappceleratortitanium-mobileappcelerator-mobile

Why is the Titanium build process so slow?


I have a 2013 Retina MacBook pro and am amazed by the XCode build speed. I can build and run a fairly large Objective-C app in the simulator in about 2-3 seconds.

When building and running a smaller Titanium App for iPhone, it takes about 15 seconds an I am wondering why. In the console, the build process is really fast, but the app hangs for about 10 seconds on "Invoking xcodebuild"

$ titanium build -p ios
Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.2.v20130206164716
Copyright (c) 2012-2013, Appcelerator, Inc.  All Rights Reserved.

Please report bugs to http://jira.appcelerator.org/

[INFO]  Build type: development
[INFO]  Building for target: simulator
[INFO]  Building using iOS SDK: 6.1
[INFO]  Building for iOS iPhone Simulator: 6.1
[INFO]  Building for device family: iphone
[INFO]  Minimum iOS version: 4.3
[INFO]  Debugging disabled
[INFO]  Initiating prepare phase
[INFO]  Copying custom Info.plist from project directory
[INFO]  Forcing rebuild: custom Info.plist CFBundleIdentifier not equal to tiapp.xml <id>
[INFO]  No Titanium Modules required, continuing
[INFO]  Cleaning old build directory
[INFO]  Performing full rebuild
[INFO]  Copying Xcode iOS files
[INFO]  Creating Xcode project directory: .../build/iphone/MyProject.xcodeproj
[INFO]  Writing Xcode project data file: Titanium.xcodeproj/project.pbxproj
[INFO]  Writing Xcode project configuration: project.xcconfig
[INFO]  Writing Xcode module configuration: module.xcconfig
[INFO]  Creating symlinks for simulator build
[INFO]  Forcing rebuild: ApplicationDefaults.m has changed since last build
[INFO]  Writing properties to ApplicationDefaults.m
[INFO]  No module resources to copy
[INFO]  No CommonJS modules to copy
[INFO]  Invoking xcodebuild

Is there anything I can do to make this faster?


Solution

  • I got the hint that lead to the solution of the problem on my Appcelerator QA Question

    The cause of the full build each time was hinted by this line in the logs:

    Forcing rebuild: custom Info.plist CFBundleIdentifier not equal to tiapp.xml <id>
    

    I have a custom Info.plist in my project which is copied to the XCode project each time. I have changed the tiapp.xml <id> property be identical to CFBundleIdentifier and the build goes through now in less than 4 seconds.