CHOP-624 header dependency improvements for build time speedup
Review Request #289 - Created May 3, 2011 and submitted
Brad Kittenbrink | Reviewers | ||
http://bitbucket.org/brad_linden/viewer-mustbuildfaster-0 | viewer | ||
CHOP-624 | |||
None | viewer-development |
Sorry for the big diff here, but reworking a LOT of header dependencies to reduce complexity and help build time. Started moving stuff out of public interfaces of classes to improve insulation (for example in llviewerregion.h and llagent.h for the biggest examples).
Posted (May 4, 2011, 11:36 a.m.)
-
indra/llxuixml/llxuiparser.h (Diff revision 1) -
Any reason to keep this commented out instead of removing it completely?
-
indra/newview/llagent.cpp (Diff revision 1) -
I know it's best practice to always set pointers to NULL after deleting, but does that also apply in the destructor? If so, maybe it should also be done for mMouselookModeInSignal and mMouselookModeOutSignal.
-
indra/newview/llagent.cpp (Diff revision 1) -
While we're editing around here, should this comment still be kept?
-
indra/newview/llviewerregion.h (Diff revision 1) -
Should probably be a const method.
-
indra/newview/llviewerregion.cpp (Diff revision 1) -
Comments referring to "I" should probably be signed, so one knows who's speaking.
-
indra/newview/llviewerregion.cpp (Diff revision 1) -
Fix indentation.
-
indra/newview/llviewerregion.cpp (Diff revision 1) -
Consider breaking this long line into several lines.
-
indra/newview/llviewerregion.cpp (Diff revision 1) -
Please place spaces around binary operator* .
-
indra/newview/llviewerregion.cpp (Diff revision 1) -
Consider using pre-increments instead of post-increments.
-
indra/newview/llviewerwindow.h (Diff revision 1) -
Any reason to keep these commented out rather than removing them completely?
Review request changed
Updated (May 4, 2011, 2:57 p.m.)
-
I tested builds personally on windows and linux although the cmake changes can only affect windows. The changes are such that testing the viewer itself is completely unnecessary. If it builds, it's good.
- changed from CHOP-619 fix for pre-compiled headers issue to CHOP-624 header dependency improvements for build time speedup
-
Fix for error using precompiled headers with vs2010 and incredibuild 3.60 beta2. We'll use this opportunity to remove all the special cases we had for working around this problem.
Sorry for the big diff here, but reworking a LOT of header dependencies to reduce complexity and help build time. Started moving stuff out of public interfaces of classes to improve insulation (for example in llviewerregion.h and llagent.h for the biggest examples).
Oops, swiched the patches when uploading, updated this issue with the info from the patch that actually got posted.
Review request changed
Updated (May 5, 2011, 5:21 p.m.)
-
- added Diff r2
Uploaded a new version of this patch incorporating some of the suggestions from Boroondas
No further objections, thus giving my "Ship it". Though, as I know near nothing about the precompiled header technique and just trust you on the assertion that these changes are ok if everything still compiles, it'd probably be good to get a review from at least one more person.
-
indra/newview/llviewerregion.cpp (Diff revisions 1 - 2) -
Tip: If you use tabs for indentation only, and spaces for alignment, stuff like this will look "right" independent of tab display size. (Yes, I know that most text editors can't do that automatically and might even work against you if you try to do it manually. :-\ )
-
indra/newview/llviewerregion.cpp (Diff revision 2) -
> on further thought, is this a bug? > should it be 0.5 * (mImpl->mLandp->getMinZ() + mImpl->mLandp->getMaxZ()) instead? Oh, didn't notice that. Then again, I was merely verifying that you don't alter functionality, not whether the present functionality makes any sense. Looking at the lines above the one in question and the method name, it might indeed well be that this is a bug and that mdV[VZ] should be set to the mean of the mLandp's minZ and maxZ. However, 1) without explanatory code comments and/or a specification of this method, we cannot tell for sure. 2) Even if this is a bug, relying code might to some hackary to compensate for it, which would lead to overcompensation if this is fixed only here. So this would need careful further examination, first. (If this is a bug and isn't compensated for elsewhere, would its effect be observable somehow? If so, how?) 3) Even if this is a bug, fixing it is out of scope for CHOP-624 and should not delay/block it. Conclusion: Good catch, but file a separate jira issue for tracking investigation and (if needed) fixing of that potential problem.
-
indra/newview/llviewerwindow.cpp (Diff revision 2) -
Just to make sure, as 'static' is that silly C++ keyword with 3 different meanings depending on context: Here you're limiting visibility of the constant to file scope, aren't you? Is that the right thing to do with it, rather than placing it in a namespace or class? Should the same be done for some of the other constants around here? (I saw you did it for one more.)
Other reviews