Board index » cppbuilder » "smart cached precompiled headers"

"smart cached precompiled headers"


2006-12-13 01:44:59 AM
cppbuilder24
Does anyone know what this actually means, and where the headers are
cached?
I have a project which has suddenly started throwing internal compiler
errors whenever I build it. In desperation I turned off the above
option, and lo - all is now right with the world.
- Roddy
 
 

Re:"smart cached precompiled headers"

Roddy Pratt wrote:
Quote
Does anyone know what this actually means, and where the headers are
cached?
It means that it caches the CSM file in RAM.
HTH
Jonathan
 

Re:"smart cached precompiled headers"

Jonathan Benedicto wrote:
Quote
It means that it caches the CSM file in RAM.
OK. So where do "dumb" cached headers get cached then?? I'd assumed
they were cached in RAM.
- Roddy
 

{smallsort}

Re:"smart cached precompiled headers"

Roddy Pratt wrote:
Quote
OK. So where do "dumb" cached headers get cached then?? I'd assumed
they were cached in RAM.
Sorry, I was getting confused with the -Hc option. -Hs just uses less RAM
than "dumb" caching.
From the help:
<quote>
When you enable this option, the compiler smart-caches the precompiled
headers it generates (smart-caching uses less memory than regular caching
option -Hc). Caching your header files in memory is useful when you are
precompiling more than one header file.
</quote>
HTH
Jonathan
 

Re:"smart cached precompiled headers"

Jonathan Benedicto wrote:
Quote
Sorry, I was getting confused with the -Hc option. -Hs just uses less
RAM than "dumb" caching.
Ah, thanks.
But why on earth is it an option, then? Surely it should just *always*
be on?
- Roddy
 

Re:"smart cached precompiled headers"

"Roddy Pratt" <>wrote:
Quote
Jonathan Benedicto wrote:
>Sorry, I was getting confused with the -Hc option. -Hs just
>uses less RAM than "dumb" caching.

Ah, thanks.

But why on earth is it an option, then? Surely it should just
*always* be on?
As you are getting compiler errors when it is switched on, it
should better be off :) Maybe they know that it doesn't work
properly, so there is an option to turn it off. Looks like
using "dumb caching" is smarter then using "smart caching" ;)
 

Re:"smart cached precompiled headers"

In article <457eea58$ XXXX@XXXXX.COM >, "Roddy Pratt" <>wrote:
Quote
Does anyone know what this actually means, and where the headers are
cached?

I have a project which has suddenly started throwing internal compiler
errors whenever I build it. In desperation I turned off the above
option, and lo - all is now right with the world.
This is one of the areas where I would like to get better testing
coverage. You can contact me directly if you have a good test case.
--
-David Dean
CodeGear C++ QA Engineer
 

Re:"smart cached precompiled headers"

David Dean [CodeGear] wrote:
Quote
This is one of the areas where I would like to get better testing
coverage. You can contact me directly if you have a good test case.
Let me see if I can narrow it down a bit. I have just installed AQTime
5 trial (chasing the variant leaks!) ,and the problem occured very
shortly after that.
- Roddy
--
 

Re:"smart cached precompiled headers"

Roddy Pratt wrote:
Quote
Jonathan Benedicto wrote:

>Sorry, I was getting confused with the -Hc option. -Hs just uses less
RAM than "dumb" caching.

Ah, thanks.

But why on earth is it an option, then? Surely it should just *always*
be on?
Maybe under certain conditions it slows down compilation.
Cheers,
Nicola
--
Nicola Musatti
Team Azzurro
nicola.musatti.googlepages.com/home
 

Re:"smart cached precompiled headers"

"Roddy Pratt" <>writes:
Quote
But why on earth is it an option, then? Surely it should just
*always* be on?
Perhaps a feature that is hard to 'prove correct' is in fact,
incorrect in some cases. It'd be unfortunate if a bug were found, but
much worse if you couldn't turn off the buggy feature.
--
Chris (TeamB);
 

Re:"smart cached precompiled headers"

Chris Uzdavinis (TeamB) wrote:
Quote
Perhaps a feature that is hard to 'prove correct' is in fact,
incorrect in some cases. It'd be unfortunate if a bug were found, but
much worse if you couldn't turn off the buggy feature.
All *anyone* seems to know about this option is that allegedly
"smart-caching uses less memory than regular caching option". Nobody
knows how much , and I've never heard anyone complain about the amount
of memory consumed by precompiled header caching.
If the feature isn't reliable, then it should either be fixed, or be
removed. You wouldn't seriously tell a customer that "we've got this
amazing new feature, but in case it doesn't work, you can always turn
it off"?
And I find this kind of pseudo-optimization particularly irritating
given that BCB 5 and 6 (and maybe earlier ones) spend almost 90% of the
alleged compile time attempting to open non-existent files. Grrrr.
- Roddy
 

Re:"smart cached precompiled headers"

Nicola Musatti wrote:
Quote
Maybe under certain conditions it slows down compilation.
Maybe under certain conditions it slows down the earth's rotation as
well... as nobody knows what the "certain conditions" are, it's still
not terribly helpful!
- Roddy
 

Re:"smart cached precompiled headers"

"Roddy Pratt" <>wrote:
Quote
If the feature isn't reliable, then it should either be fixed, or be
removed.
Fix what? Is there any bug in it that you know of? In what way is it
unreliable? Perhaps it fails when you don't have much RAM, and the
alternative doesn't. In which case, it's useful, but it needn't have the
ability to disable it removed.
Alan Bellingham
--
Team Thai Kingdom
<url:www.borland.com/newsgroups/>Borland newsgroup descriptions
<url:www.borland.com/newsgroups/netiquette.html>netiquette
 

Re:"smart cached precompiled headers"

Alan Bellingham wrote:
Quote
Fix what? Is there any bug in it that you know of? In what way is it
unreliable?
I have a situation where I get an internal compiler error with this
option enabled. It's not yet succinct enough to be QC'able, but I'm
working on it.
Having said that, I was hoping to make a more general point about
unnecessary options. The C++ options dialog has literally hundreds of
options, many of which are undocumented or poorly documented, and many
of which (like 'smart precompiled header cache') seem totally
unneccessary. Compare the number of Delphi options with number C++
ones....
- Roddy
 

Re:"smart cached precompiled headers"

"Roddy Pratt" <>writes:
Quote
If the feature isn't reliable, then it should either be fixed, or be
removed. You wouldn't seriously tell a customer that "we've got this
amazing new feature, but in case it doesn't work, you can always turn
it off"?
I'm not trying to suggest it doesn't work. I'm just saying that being
able to disable features, especially those you don't fully understand,
might have some benefit. At least, knowing that it (or anythign) can
be switched off can make some people feel better, even if they never
have to do so.
Quote
And I find this kind of pseudo-optimization particularly irritating
given that BCB 5 and 6 (and maybe earlier ones) spend almost 90% of the
alleged compile time attempting to open non-existent files. Grrrr.
Heh. I didn't know that!
--
Chris (TeamB);