Details
-
Task
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
None
-
1
-
KV-Engine Sprint 2021 June
Description
Some experimentation with CMake 3.16's support for precompiled headers [1] shows that using them can reduce KV-Engine clean build time by at least ~15% - measuring using clang-build-analyser after precompiling a handful of popular headers[2]:
Before:
Compilation (742 times):
Parsing (frontend): 4798.7 s
Codegen & opts (backend): 728.7 sAfter:
Compilation (744 times):
Parsing (frontend): 4093.3 s
Codegen & opts (backend): 726.7 s
We should finish off and integrate PCH support into the build.
[1]: https://onqtam.com/programming/2019-12-20-pch-unity-cmake-3-16/
[2]: https://github.com/daverigby/kv_engine/tree/clang_build_analyser_precompiled_headers
Attachments
Issue Links
For Gerrit Dashboard: MB-43677 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
154829,22 | MB-43677: Add PCH Object Library | master | kv_engine | Status: ABANDONED | 0 | -1 |
155106,1 | MB-43677: Add reuse_pch function so that we can enable/disable PCHs | master | tlm | Status: ABANDONED | 0 | +1 |
155107,4 | MB-43677: Add reuse_pch function so that we can enable/disable PCHs | master | tlm | Status: ABANDONED | 0 | +1 |
155177,3 | MB-43677: Add reuse_pch function and option to enable/disable PCHs | master | tlm | Status: MERGED | +2 | +1 |
155349,11 | MB-43677: Add PCH Object Library | master | kv_engine | Status: MERGED | +2 | +1 |
155429,7 | MB-43677: Add kv_enable_pch to executable targets | master | kv_engine | Status: MERGED | +2 | +1 |
155430,10 | MB-43677: Add kv_enable_pch to static library targets | master | kv_engine | Status: MERGED | +2 | +1 |
155431,7 | MB-43677: Add kv_enable_pch to shared library targets | master | kv_engine | Status: ABANDONED | 0 | -1 |
155432,9 | MB-43677: Add kv_enable_pch to object libraries | master | kv_engine | Status: MERGED | +2 | +1 |
155442,7 | MB-43677: Add gsl to precompiled header | master | kv_engine | Status: MERGED | +2 | +1 |
155518,2 | MB-43677: Remove NO_OPTIMIZE flags | master | kv_engine | Status: MERGED | +2 | +1 |
155686,1 | MB-43677: Update KV min cmake version to 3.16 | master | kv_engine | Status: ABANDONED | 0 | 0 |
155712,3 | MB-43677: Remove unnecessary add_dependencies from reuse_pch | master | tlm | Status: MERGED | +2 | +1 |
155770,7 | MB-43677: Recompile fmtlib with hidden visibility | master | tlm | Status: MERGED | +2 | +1 |
155786,5 | MB-43677: Add precompiled header to platform | master | platform | Status: MERGED | +2 | +1 |
155788,5 | MB-43677: Add PCH to all platform targets | master | platform | Status: MERGED | +2 | +1 |
156023,3 | MB-43677: Fix PCH headers causing ccache cache misses | master | platform | Status: ABANDONED | 0 | -1 |