-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow stacktraces in large projects #323
Comments
Your executable is 4x bigger than the RAM on my first computer xD
I am afraid you reached the limits here. It should be possible to add
libbacktrace support to backward-cpp. Similar to how it handles dw and bfd.
Feel free to give it a go. Add a new define atop of backward.hpp. Add the
ifdef to include the libbacktrace header. Then follow the example of bfd
and dw to implement the resolver class within ifdefs :)
Or maybe your solution is best solved by using libbacktrace directly.
Afterall it can do what backward-cpp does, but faster. You would only need
to implement a trace formatter. Feel free to copy or getting inspiration
from the formatting code in backward-cpp.
…On Fri, Dec 15, 2023, 00:15 diehard2 ***@***.***> wrote:
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.png (view on web)
<https://github.com/bombela/backward-cpp/assets/542044/283dff9e-74ad-4b4e-9edd-4b44e2684a37>
—
Reply to this email directly, view it on GitHub
<#323>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUZDH4YJXRYXJHIARGRWLYJOB7TAVCNFSM6AAAAABAVTL4KCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2DENRUGQYDKOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: