Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-43677

Enable precompiled headers for KV-Engine build

    XMLWordPrintable

Details

    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 s

      After:

      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ben.huddleston Ben Huddleston
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty