Re: Gratuitous rebuilds in Xcode 2.3
Re: Gratuitous rebuilds in Xcode 2.3
- Subject: Re: Gratuitous rebuilds in Xcode 2.3
- From: Jim Wintermyre <email@hidden>
- Date: Mon, 4 Dec 2006 20:27:25 -0800
At 12:07 PM -0700 10/17/06, B.J. Buchalter wrote:
Hi Shaun,
Thanks for the quick reply.
I have just verified that quitting and relaunching does not cause it to
rebuild. Crashing doesn't either, but reboot seemed to.
The Project has the Build products in the Project directory and
intermediates with build products (the project defaults).
I'm not sure where to check the precomp behaviors.
The project settings are:
SHARED_PRECOMPS_DIR =
/Library/Caches/com.apple.Xcode.$(UID)/SharedPrecompiledHeaders
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES
GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES
GCC_USE_GCC3_PFE_SUPPORT = YES
GCC_ENABLE_SYMBOL_SEPARATION = YES
Any ideas as to what would be forcing the recompile after reboot? Any
settings to "debug" the process by which Xcode decides to recompile files?
Also uncheck precomp sharing in the build/target.
Ah; is this causing problems???
Assuming you don't have a problem in your header include paths... see
if your intermediate builds are stored in a volatile temp directory,
and then examine your precomp behaviors. I keep all my intermediates
in ~/Library/Caches/Xcode/IntermediateBuilds, so it's easy to trash
them as needed. Placing them somewhere in /tmp will force clean
rebuilds at least daily or after a restart. Then you can
optimize backwards
from there.
Thanks again!
B.J. Buchalter
I've been seeing similar issues in our projects. It looks like in
our case it is due to precompiled header usage. By default, XCode
puts the precompiled headers into
/Library/Caches/com.apple.Xcode.n/SharedPrecompiledHeaders/, where n
is the current user ID. This cache folder periodically gets cleaned
out, based on the prefs settings BuildSystemCacheSizeInMegabytes and
BuildSystemMinimumRemovalAgeInHours (you can change these with the
defaults tool, see Expert Preferences Notes from the Help menu for
details). Depending on these settings, and how big the precompiled
headers for your projects are, this could happen more frequently than
you might expect.
Coming from CodeWarrior, I was really surprised to find this
behavior. First, CW precompiled headers are generally stored in the
project folder itself. This is handy for example if you happen to
have your build tree(s) on a portable drive that moves between
systems. And it means that things don't get rebuilt unless a header
change necessitates it, or you manually remove object code. Also,
the size of the CW precompiled headers seem to be WAY smaller than
what XCode generates. For example, in one of our plugin projects the
XCode precompiled header was about 40 MB, whereas the CW one was less
than 4 MB. Even accounting for double compilation for universal
binaries, that seems ludicrous. Now, doing a full build of our
product, which consists or about 40 plugins, times 3 different plugin
formats, plus a couple user apps and a framework, my precompiled
header cache alone is about 10 GB, over twice the size of the entire
source code tree (which also contains all the built products)!
Additionally, it seems that using the precompiled header at all may
not result in that much speed savings, particularly with distributed
builds, and/or quad processor machines. The PCH must be compiled by
a single processor, and everything else has to wait for that to
finish, whereas just having a non-precompiled prefix file can be
included in multiple source files which compile concurrently. In CW,
there was a much more dramatic difference in build time when using a
PCH.
I think that I might have some setting incorrect. I have a
subproject which builds a static lib. This lib is used by each of
the plugins, and should only need to be built once. However, when I
do a full build, my PCH cache ends up with as many copies of this PCH
folder as there are plugins, which implies that something is causing
XCode to think it needs to be rebuilt for each plugin? Each PCH
folder has a name like "PluginLibrary-xxx" where xxx is some
28-letter lowercase hash. Could this be some weirdness due to using
subprojects?
Thanks,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden