bombela/backward-cpp

Slow stacktraces in large projects

diehard2 opened this issue · 1 comments

Hi, really like this library a lot. I'm working off the latest commit. My project is fairly large although not excessive, the executable is 127 MB.

For BFD I'm seeing it take approximately 2.3 seconds to generate the stacktraces (no source printing). If I use dw I'm seeing 860 ms. It does not get faster on subsequent runs. For reference, an approach I have that calls out to addr2line takes about 500ms for the same stack.

If I use boost stacktrace (which I do not like as much) and use libbacktrace I am seeing 192 ms for the first call and sub ms for subsequent calls due to their caching.

Is there anything that can be done here? If it helps this is the flamegraph for bfd. The reason I am looking for performant stacktraces is I'm logging them whenever there is a failure in my service and processing then continues. Thanks for any help

image