Details
-
Task
-
Status: Stalled (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached:
- Header decomposition to improve files affected per line value.
- Use of precompiled headers
- Template optimization
This task is about the headers problem investigation.
- Take a look how a time changes with precompiled headers enabled.
- Work out the guidelines on enabling the precompiled headers generation for used system libraries.
- And/or update build scripts to support precompiled headers generation.
- If the build will still look too slow, analyze the template usages.
This tool may be helpful for the header analysis:
https://github.com/mikael-s-persson/templight
See also:
- How .gch works: https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html
- For header dependency analysis: https://stackoverflow.com/a/60570938
- Clang modules: https://clang.llvm.org/docs/Modules.html#using-modules
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description | https://github.com/mikael-s-persson/templight |
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached: * Header decomposition to improve files affected per line value. https://github.com/mikael-s-persson/templight |
Description |
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached: * Header decomposition to improve files affected per line value. https://github.com/mikael-s-persson/templight |
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached: * Header decomposition to improve files affected per line value. * Use of precompiled headers * Template optimization This task is about the headers problem investigation. * Take a look how a time changes with precompiled headers enabled. * Work out the guidelines on enabling the precompiled headers generation for used system libraries. * And/or update build scripts to support precompiled headers generation. * If the build will still look too slow, analyze the template usages. This tool may be helpful for the header analysis: https://github.com/mikael-s-persson/templight |
Workflow | MariaDB v3 [ 122144 ] | MariaDB v4 [ 131503 ] |
Fix Version/s | 10.2 [ 14601 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Description |
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached: * Header decomposition to improve files affected per line value. * Use of precompiled headers * Template optimization This task is about the headers problem investigation. * Take a look how a time changes with precompiled headers enabled. * Work out the guidelines on enabling the precompiled headers generation for used system libraries. * And/or update build scripts to support precompiled headers generation. * If the build will still look too slow, analyze the template usages. This tool may be helpful for the header analysis: https://github.com/mikael-s-persson/templight |
Changes to the most accessed headers require recompilation of 500 files avg, which takes about 3 mins on 6 cores. The time tends to grow YoY.
Several of build time improvements may be approached: * Header decomposition to improve files affected per line value. * Use of precompiled headers * Template optimization This task is about the headers problem investigation. * Take a look how a time changes with precompiled headers enabled. * Work out the guidelines on enabling the precompiled headers generation for used system libraries. * And/or update build scripts to support precompiled headers generation. * If the build will still look too slow, analyze the template usages. This tool may be helpful for the header analysis: https://github.com/mikael-s-persson/templight See also: * How .gch works: https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html * For header dependency analysis: https://stackoverflow.com/a/60570938 * Clang modules: https://clang.llvm.org/docs/Modules.html#using-modules |
Fix Version/s | 10.2 [ 14601 ] |
Fix Version/s | 10.7 [ 24805 ] |
Fix Version/s | 10.3 [ 22126 ] |
Fix Version/s | 10.8 [ 26121 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Fix Version/s | 10.4 [ 22408 ] |
so far precompiling the headers reduces the build time about 5 times:
for ninja minbuild with PFS disabled it dropped from 2:30 to 0:30!
The major disadvantage for this method is that all the headers precompiled are stored in one precompiled file which is forcefully pre-included in every build.
Thus, by using PCH, one may end up with using symbols from the headers that are not actually included.
The alternative is of course c++20 submodules, which does the same, but smart.
The another alternative is GCC which handles .gch files differently: if the precompiled file is available, it is being used, or else the actual header is taken.
So for now I can try to use the alternative way for GCC, but the rest of compilers will remain screwed at either build speed or dependency integrity.