Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
RFC: On PCH simplication under Windows
stahta01:
--- Quote from: oBFusCATed on April 08, 2018, 08:58:54 am ---Why another target? The two files have correct weights...
Do you see any difference in compile times with your changes?
Because if there is not difference I don't see why we should bother at all.
--- End quote ---
After adding the path to the PCH; my times are cut by 30 to 50 percent for the contrib projects.
But, that is without my patches.
My patches are to make it easier to use the PCH file (sdk.h) in the contrib projects.
Since, every time I have posted my patches to fix the PCH in the contrib projects I have been ignored I gave up on posting that fix and
decided the ease of use might be the problem.
Tim S.
stahta01:
--- Quote from: oBFusCATed on April 08, 2018, 08:58:54 am ---Why another target? The two files have correct weights...
--- End quote ---
The pch target is planned to reduce the number of the defines to the minimum needed.
Tim S.
stahta01:
I am looking at the SDK headers you edited in the last 3 months; and, it looks like removing several of those headers make sense from the sdk PCH file.
I will see which CB SDL files in sdk_common.h are good candidates to remove from it.
If the number of files in sdk_common.h are reduced it will not need to be compile as often and will compile faster.
This could take a while to figure out which files should be kept and which should be removed.
It might take me a few weeks just to decide the best way to judge the best way to proceed.
I will likely need to find out how to get reports from git on the header files most often edited.
Tim S.
oBFusCATed:
Why do you care about how often a header is edited?
The important metric is how often it is included without being needed.
I often edit random headers and if I could I would disable the pch, but currently this is not possible.
The compilation is fast (around a minute for all the core targets), so it doesn't bother me too much, so I don't do anything about this problem.
Also the idea of the pch is to help with compilation speed. So you should measure the effect of every header included in the pch on the compilation speed...
Generally I have the idea to do a cmake based build system, because editing 5-6 sets of cbp files is quite annoying and it is not possible to create a command line build on windows. So I cannot setup an appveyor builds similarly to the travis builds...
But I don't have the time right now...
stahta01:
Because one of the things that is suggested is NOT to put headers into a PCH that is frequently edited.
The other criteria is to put headers that are included by many source files into the PCH.
Based on the last 3 months cbplugin.h almost counts as frequently edited.
Another rule is to avoid putting headers into the PCH that breaks the PCH build.
There is 3 or 4 files that breaks the PCH build; found out by adding them a few years ago.
The results of a quick manual search using an GUI search tool.
Tim S.
--- Code: ---settings.h found in 65 cpp files and in 56 sdk header files
globals.h found in 180 cpp files and in 19 sdk header files
sdk_events.h found in 38 cpp files and in 1 sdk header files
cbexception.h found in 35 cpp files and in 6 sdk header files
logger.h found in 16 cpp files and in 3 sdk header files
editorbase.h found in 13 cpp files and in 1 sdk header files
cbeditor.h found in 93 cpp files and in 1 sdk header files
compileoptionsbase.h found in 3 cpp files and in 2 sdk header files
compiletargetbase.h found in 2 cpp files and in 4 sdk header files
projectbuildtarget.h found in 22 cpp files and in 1 sdk header files
projectfile.h found in 13 cpp files and in 1 sdk header files
cbplugin.h found in 26 cpp files and in 4 sdk header files
cbproject.h found in 99 cpp files and in 1 sdk header files
cbtool.h found in 3 cpp files and in 1 sdk header files
cbworkspace.h found in 15 cpp files and in 0 sdk header files
compilerfactory.h found in 36 cpp files and in 1 sdk header files
compiler.h found in 30 cpp files and in 1 sdk header files
workspaceloader.h found in 9 cpp files and in 0 sdk header files
editorcolourset.h found in 32 cpp files and in 0 sdk header files
pipedprocess.h found in 4 cpp files and in 0 sdk header files
scrollingdialog.h found in 13 cpp files and in 24 sdk header files
cbauibook.h found in 24 cpp files and in 1 sdk header files
manager.h found in 215 cpp files and in 19 sdk header files
configmanager.h found in 200 cpp files and in 3 sdk header files
editormanager.h found in 116 cpp files and in 1 sdk header files
logmanager.h found in 169 cpp files and in 1 sdk header files
projectmanager.h found in 87 cpp files and in 2 sdk header files
menuitemsmanager.h found in 3 cpp files and in 2 sdk header files
scriptingmanager.h found in 16 cpp files and in 1 sdk header files
toolsmanager.h found in 5 cpp files and in 0 sdk header files
templatemanager.h found in 5 cpp files and in 0 sdk header files
macrosmanager.h found in 46 cpp files and in 1 sdk header files
pluginmanager.h found in 30 cpp files and in 3 sdk header files
personalitymanager.h found in 15 cpp files and in 0 sdk header files
uservarmanager.h found in 7 cpp files and in 1 sdk header files
filemanager.h found in 14 cpp files and in 1 sdk header files
xtra_res.h found in 6 cpp files and in 0 sdk header files
safedelete.h found in 2 cpp files and in 1 sdk header files
infowindow.h found in 21 cpp files and in 0 sdk header files
licenses.h found in 1 cpp files and in 0 sdk header files
--- End code ---
Looking at selected files; I am currently thinking to follow the Keep and remove below under Linux
(It gets more consistent build times).
And, then try removing things not in the keep list and see if the core project build time drops.
--- Code: ---Keep in PCH
settings.h
globals.h
manager.h
sdk_events.h
cbexception.h
configmanager.h
editormanager.h
logmanager.h
logger.h
projectmanager.h
macrosmanager.h
cbproject.h
--- End code ---
--- Code: ---Remove from PCH file
licenses.h
safedelete.h
xtra_res.h
filemanager.h
uservarmanager.h
templatemanager.h
toolsmanager.h
pipedprocess.h
workspaceloader.h
cbtool.h
cbauibook.h
scriptingmanager.h
pluginmanager.h
editorcolourset.h
personalitymanager.h
--- End code ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version