Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Single PCH file for building the CodeBlocks_wx31_64.cbp

<< < (4/7) > >>

oBFusCATed:
BTW: Don't get me wrong. I'm not opposing the visibility related changes. They are good and important!
I just don't like PCHs and I think they are stupid and a waste of time. :)

Do you get improvement when loading C::B? It should improve load performance, because the dynamic library loader has less work to do when loading DLLs with smaller number of symbols. At least on linux this is pretty slow step.

I don't know if the windows toolchain supports the gc-sections linker option (you need to use -fdata-sections and -ffunction-sections for the compiler for this to work). This leads to smaller .exe and .dll files when using hidden visibility at least on linux. My knowledge about windows related stuff is quite limited these days. :)

ollydbg:

--- Quote from: oBFusCATed on November 30, 2020, 09:18:05 pm ---No this is not how you benchmark. Apply all changes in your branch, then try to measure PCH-on versus PCH-off.
Currently you're measuring noPCH+massive amount of symbols and PCH+smaller amount of symbols. The linking step in C::B is serial, so it has big effects on the overall time. Smaller number of symbols improves linking performance.

--- End quote ---
OK, I see. I may need to create a new branches, and cherry pick some commits to compare the PCH-on vs PCH-off issue.


--- Quote ---Also what happens if you just put only wx related includes in the PCH or you use the wxprec.h or whatever is called?
--- End quote ---
How can I do it, I need to first build/compile the wx.h file to a gch file?

--- Quote ---p.s. My build time on Linux, GCC 9.3.0, Amd Ryzen7 1700 (relatively slow CPU in 2020, it is slower than a mobile cpu produced by a fashion/fruit company) is:
1. 93 sec with PCH.
2. 123 sec without PCH.
--- End quote ---
You computer is strong! I'm using an old PC which I bought in 2016.

oBFusCATed:

--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---OK, I see. I may need to create a new branches, and cherry pick some commits to compare the PCH-on vs PCH-off issue.

--- End quote ---
You don't need to do this. Just build from your branch, this would give you the PCH build time. After that disable compiling of the two pch files and change CB_PRECOMP to something else in the project settings. This would give you the noPCH build time.


--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---How can I do it, I need to first build/compile the wx.h file to a gch file?

--- End quote ---
No idea... Probably the build of wx already provides it. The other option is to remove all non-wx headers from the sdk.h and sdk_precomp.h.


--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---You computer is strong! I'm using an old PC which I bought in 2016.

--- End quote ---
Actually it is really slow in 2020. As I've said the fruit company has a mobile processor which is faster than it. :)

stahta01:

--- Quote from: oBFusCATed on December 01, 2020, 04:29:13 pm ---
--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---OK, I see. I may need to create a new branches, and cherry pick some commits to compare the PCH-on vs PCH-off issue.

--- End quote ---
You don't need to do this. Just build from your branch, this would give you the PCH build time. After that disable compiling of the two pch files and change CB_PRECOMP to something else in the project settings. This would give you the noPCH build time.


--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---How can I do it, I need to first build/compile the wx.h file to a gch file?

--- End quote ---
No idea... Probably the build of wx already provides it. The other option is to remove all non-wx headers from the sdk.h and sdk_precomp.h.


--- Quote from: ollydbg on December 01, 2020, 03:33:19 pm ---You computer is strong! I'm using an old PC which I bought in 2016.

--- End quote ---
Actually it is really slow in 2020. As I've said the fruit company has a mobile processor which is faster than it. :)

--- End quote ---

I find that changing "CB_PRECOMP" to "NOPCH" and disable compiling of PCH headers (remember to delete the PCH gch files if they exists) works okay for me.

Edit: Remember to remove the compiler "--include" command in your case.

Tim S.

ollydbg:

--- Quote from: stahta01 on December 01, 2020, 06:34:34 pm ---...

I find that changing "CB_PRECOMP" to "NOPCH" and disable compiling of PCH headers (remember to delete the PCH gch files if they exists) works okay for me.

Edit: Remember to remove the compiler "--include" command in your case.

Tim S.

--- End quote ---

I just did it, and the build time is:


--- Code: ---Process terminated with status 0 (8 minute(s), 44 second(s))
0 error(s), 22 warning(s) (8 minute(s), 44 second(s))

--- End code ---

So, the "NOPCH" build time is just the same as the standard "two PCH files" build time. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version