Re: Unnecessary rebuilds of precompiled headers
Re: Unnecessary rebuilds of precompiled headers
- Subject: Re: Unnecessary rebuilds of precompiled headers
- From: Emile Tobenfeld <email@hidden>
- Date: Mon, 18 Jun 2007 13:43:59 -0400
Title: Re: Unnecessary rebuilds of precompiled
headers
At 11:44 PM -0700 6/15/07, Chris Espinosa wrote:
On Jun 15, 2007, at 6:58 PM, Emile
Tobenfeld (a. k. a Dr. T) wrote:
I've complained
about this before, and it becomes more and more annoying as our
product gets closer to completion.
A lot (perhaps
all) or our projects. have extremely fragile precompiled headers. They
do a full rebuild whenever any change is made to the project,
including changes that have no effect on how the precompiled header
builds.
e.g.
They rebuild
when:
1
I add a file (cpp, .mm. .h) to a project or enable a file in a
target.
2. I
switch to a different target and build it, or just switch targets and
switch back
3. I add
an executable to the project, or switch executables.
4. Make
any change to any setting in a target info window.
and sometimes for
no apparent reason.
Is there anything
we can do to fix this?
Our Precompiled
Headers Cache Path is set to
SHARED_PRECOMPS_DIR = $(OBJROOT)/Precomps
You'll have to provide more information
than just symptoms. Build transcripts would be useful, if only
just of the steps that build the precompiled headers.
You are correct that 1, 2, and 3, should
not cause precompiled headers to need to be rebuilt. 4. should
happen when substantive changes are made, that is, a
change that affects the flags sent to the compiler that control
preprocessing and code generation; but not just any build
setting.
Some things to check:
1) Does your prefix file #include
frequently-changing project headers, or just the rarely-changing
system headers? It ends up to not be worth it, in most cases, to
precompile your project headers, as you spend more time rebuilding the
pchs than you save in having them precompiled. Best to just have
your prefix file #include only the system framework headers you're
using.
It contains a lot of rarely-changing project headers, plus the
system headers.
2) Is OBJROOT fixed or is it different
for different projects? Having precompiled headers in different
locations may cause some thrashing.
Each project is in its own folder, but has multiple targets. Each
project's precompiled cache is set to build/Precomps, which becomes
$(OBJROOT)/Precomps when I double click it. I do not think we have
defined $(OBJROOT) ourselves
3) What's your threshhold for the
precompiled header cache size and aging? It could be that you're
losing older precomps because the directory's getting too full, and
those have to be regenerated when you need them. See the Expert
Preferences for the setting to make the threshhold
larger.
I don't see any entry for Expert Preferences in the UI, and a
search of the Xcode docs does not help.
If you can come up with a case where you
can reliably reproduce the pch rebuilding when it shouldn't have to,
write a Radar bug detailing the steps and we'll respond with some
commands that generate diagnostics that will help us isolate
it.
I'm not sure how I can do this without giving you the whole code
tree.
Chris
--
"Now, here, you see, it takes all the
running you can do, to keep in the same place. If you want to get
somewhere else, you must run at least twice as fast as that!" --
The Red Queen
Emile Tobenfeld, Ph. D.
Video Producer
Image Processing Specialist
Video for your HEAD!
Boris FX
http://www.foryourhead.com
http://www.borisfx.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden