mirror of https://github.com/oxen-io/lokinet
Optimization: eliminate unneeded shared_ptrs
We have a few cases where we're making an extra shared_ptr which we copy into a lambda, which then results in an extra unnecessary refcount decrement in the parent; this changes them to give an rvalue reference to the lambda to avoid the extra incr/decr instead. The one in Session::Pump is particularly noticeable and shows up in profiling.pull/1797/head
parent
3fc172f4dd
commit
b2ee003329
Loading…
Reference in New Issue