error-chain icon indicating copy to clipboard operation
error-chain copied to clipboard

Backtraces shouldn't need to be resolved unless necessary

Open Marwes opened this issue 8 years ago • 3 comments
trafficstars

Currently backtraces are resolved immediately via Backtrace::new https://github.com/rust-lang-nursery/error-chain/blob/c9b37574d4cbcc1c27a1a72de928c77f447e56ac/src/lib.rs#L616 but the backtrace crate also supports constructing an unresolved backtrace. Is there any reason why a resolved backtrace is constructed instead of an unresolved?

If error-chain constructed a resolved backtrace lazily instead of immediately that could be a nice performance boost (as indicated by the backtrace docs).

Marwes avatar Sep 19 '17 14:09 Marwes

Oh nice, I started https://github.com/alexcrichton/backtrace-rs/pull/32 but never finished it. Do you want to do a PR to integrate this feature?

Yamakaky avatar Sep 19 '17 15:09 Yamakaky

@Yamakaky Got a bunch of projects and PRs in in progress already but if I get some time I may look into it.

I will post if I start working on this though.

Marwes avatar Sep 19 '17 18:09 Marwes

Same ;)

Yamakaky avatar Sep 19 '17 20:09 Yamakaky