Skip to content

Disabled Backtracer performance impact #3431

@Tag365

Description

@Tag365

Question regarding performance.

We currently create separate logger instances (using multisink with console and file output). for all the different log levels and check the log level on our end before calling logger::log. Now the library will for sure check the log level too, so there are two similar checks, which made me question the performance on our end.

I tested moving to one logger instance/default logger and let the library do everything, however its quite a lot slower.
We use Valgrind Callgrind to profile our code and with the one logger I see spdlog::details::backtracer::enabled appearing.
I would like to keep the runtime level check, rather then compile time using the provided MACRO's.

Therefore the my main question: Is it possible to remove the backtracing completely in compile time rather then just deactivating it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions