[MDEV-25774] profile build speed of the server code base Created: 2021-05-25 Updated: 2023-12-15 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Task | Priority: | Major |
| Reporter: | Nikita Malyavin | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | 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.
This task is about the headers problem investigation.
This tool may be helpful for the header analysis: See also:
|
| Comments |
| Comment by Nikita Malyavin [ 2022-01-11 ] |
|
so far precompiling the headers reduces the build time about 5 times: 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. 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. |
| Comment by Nikita Malyavin [ 2022-01-29 ] |
|
Some intermediate results are here: |
| Comment by Aleksey Midenkov [ 2023-01-11 ] |
|
Can it be cmake config option turned off by default? It would be also good if configuration could choose between gcc/clang for compilation, between ld/lld for linker and whether to ccache or not. |
| Comment by Nikita Malyavin [ 2023-08-16 ] |
|
GCC's gch approach has no benefit – it also can only use a single gch per invocation.
At the same time, c++20 modules support is released both in gcc and clang just not far from now. GCC: On integration with cmake: https://www.kitware.com/import-cmake-c20-modules/ |
| Comment by Julien Fritsch [ 2023-12-05 ] |
|
Automated message: |
| Comment by JiraAutomate [ 2023-12-05 ] |
|
Automated message: |
| Comment by Nikita Malyavin [ 2023-12-15 ] |