T O P I C R E V I E W |
sjaffe |
Posted - Jul 23 2007 : 3:38:50 PM I'm using VS2005 and VAX 1557. I found a project setting called "Enable Minimal Rebuild (/Gm)". This sounded good to me so I enabled it. It didn't seem to make much (if any) difference. Reading through the documentation, it appears that the way it is determined if a file needs to be rebuilt is based on the dependent class definitions. It sounds as if rather than a header file timestamp changing to determine if the corresponding cpp file needs to be rebuilt, it's looking at the actual class definition, so no class definition change, no rebuild. To test this theory, I touched a header file without actually changing any code. The dependent cpp files rebuilt anyway. I have followed While Tomato's recommendation to disable Intellisense (generally a good thing), but now I'm suspicious that I have also disabled the Minimal Rebuild feature as well. Could you confirm?
Thanks |
4 L A T E S T R E P L I E S (Newest First) |
sjaffe |
Posted - Jul 24 2007 : 12:39:31 PM We are using pre-compiled headers, but that only applies to a small subset of files. All the rest of the headers in the system are not pre-compiled. |
feline |
Posted - Jul 24 2007 : 12:08:17 PM *ah* I understand now. To be honest I really don't know the answer.
One possible approach is that if you have pre-compiled header files enabled, and the header file in question is being compiled, that the compiler will recompile the header file, and then check the two object files for differences. This avoids having to know the "state" or "age" of the intellisense information.
Certainly if anyone knows the answer, or you find the answer I would be most interested in hearing what it was. |
sjaffe |
Posted - Jul 24 2007 : 10:48:14 AM I enabled Minimal Rebuild to speed up compiles. I removed Intellisense to speed up the IDE. I will try to explain better:
Enable Minimal Rebuild documentation states that it will minimize the number of files compiled when a header file is changed by determining if the actual class definition changed rather than if only the timestamp of the file changed. For example, I have ten cpp files that include a particular header file. I add a blank line to the header file. Now all ten cpp files will be rebuilt even though no actual code changed in the header.
Now if I enable Minimal Rebuild, my understanding of how this works for the above scenario: I add a blank line to the header, but no actual code is modified. My theory is through using Intellisense, it is determined that even though the file was modified (new blank line), the Intellisense notes that no CODE was changed, hence no cpp files are rebuilt, and the build is "minimized".
This is my theory on how it works based on the documentation. I am posting here to see if anyone knows if this is actually the way it works and if turning Intellisense off (as recommended by Whole Tomato) would negate this feature.
I hope that is a better explanation. |
feline |
Posted - Jul 24 2007 : 07:15:14 AM I am not sure I understand the question.
Based on this description "Enable Minimal Rebuild (/Gm)" is a compiler flag, to tell the compiler to compile less code.
Intellisense and compilation are two separate things, so compiler flags should not have any effect on either the IDE's intellisense scanner or VA's scanner. The main exceptions here are additional include directories (VA uses these so it can find header files to scan) and pre-processor definitions (VA ignores these but VS2005 uses them).
Are you trying to speed up the IDE generally, or speed up your compiles? |
|
|