How to #include <myownheader.h> in rootlogon.C

If I understand correctly, when ROOT starts up you immediately declare to the interpreter your own class, which depends on yaml-cpp and spdlog. This is quite a bit of functionality that the interpreter has to just-in-time-compile. 2 seconds does not seem unreasonable for that as a one-time start-up cost. I bet g++ or clang++ would take a similar amount of time.

Maybe one thing you could try is to load your class with .L myclass.h+ (or the equivalent via gSystem->CompileMacro) which should skip recompilation after the first time.

Cheers,
Enrico

1 Like