perf: Remove anyhow from P2P code#6244
Conversation
anyhow from P2P codeanyhow from P2P code
Does it make a noticeable difference in our performance tests? |
I only tried the |
…ichhorl/remove-anyhow
wow |
`anyhow` captures a backtrace whenever an error is created. This can be quite expensive and has lead to a performance regression after updating the `libunwind` version in #4848. The P2P code does not make use of this backtrace anywhere. Therefore, this PR removes `anyhow` from all P2P crates, and replaces it with a custom opaque error type, that doesn't capture backtraces. See also this issue: dtolnay/anyhow#346 --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
anyhowcaptures a backtrace whenever an error is created. This can be quite expensive and has lead to a performance regression after updating thelibunwindversion in #4848.The P2P code does not make use of this backtrace anywhere.
Therefore, this PR removes
anyhowfrom all P2P crates, and replaces it with a custom opaque error type, that doesn't capture backtraces.See also this issue: dtolnay/anyhow#346