compilation time increased

Hi, Observing compilation time increase when i include boost interprocess headers. is there a way to reduce compilation time as this time going more than hours in large project. -- Regards, Murali Kishore

Hi, You can use the usual practices: - use precompiled header(s) for headers from 3rd party libraries which usually don't change - and/or isolate the functionality which needs these headers in one or few .cpp files and thus include the headers only there Regards, Pavel. On Wed, Feb 12, 2025 at 4:02 PM Murali Kishore via Boost < boost@lists.boost.org> wrote:
Hi,
Observing compilation time increase when i include boost interprocess headers. is there a way to reduce compilation time as this time going more than hours in large project.
-- Regards, Murali Kishore
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, Feb 12, 2025 at 3:02 PM Murali Kishore via Boost < boost@lists.boost.org> wrote:
Hi,
Observing compilation time increase when i include boost interprocess headers. is there a way to reduce compilation time as this time going more than hours in large project.
I have no idea about boost interprocess, but until somebody more knowledgeable answers here are some general tips: 1. see preprocessed file so you can check how much LOC boost interprocess adds 2. ask compiler to print include files, so you can get the idea what boost interprocess includes if you do not want to go over boost interprocess files manually and look for includes LOC is not a precise way to check for slowdowns, but it is a good proxy, for example g++-13 example.cpp -E | wc -l 12461 Then you add boost interprocess headers to example, repeat the command and see how much code was added.

On Wed, 12 Feb 2025 at 15:13, Ivan Matek via Boost
On Wed, Feb 12, 2025 at 3:02 PM Murali Kishore via Boost < boost@lists.boost.org> wrote:
Hi,
Observing compilation time increase when i include boost interprocess headers. is there a way to reduce compilation time as this time going more than hours in large project.
I have no idea about boost interprocess, but until somebody more knowledgeable answers here are some general tips:
1. see preprocessed file so you can check how much LOC boost interprocess adds 2. ask compiler to print include files, so you can get the idea what boost interprocess includes if you do not want to go over boost interprocess files manually and look for includes
LOC is not a precise way to check for slowdowns, but it is a good proxy, for example g++-13 example.cpp -E | wc -l 12461 Then you add boost interprocess headers to example, repeat the command and see how much code was added.
I'd advise measuring using clang and the -ftime-trace option. It generates a flamegraph per cpp file that you can visualize in Chrome.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Wed, Feb 12, 2025 at 8:42 PM Ruben Perez
I'd advise measuring using clang and the -ftime-trace option. It generates a flamegraph per cpp file that you can visualize in Chrome.
It is more advanced, but I had good experiences with ClangBuildAnalyzer
that is a nicer wrapper of your suggestion for entire build.
participants (4)
-
Ivan Matek
-
Murali Kishore
-
Pavel Vazharov
-
Ruben Perez