Closed steveej closed 5 years ago
I did some memory measurements and the following are before and after [1]:
Using tokio_core::reactor::Core
: (before)
examples/image.rs:53 'run': 101253 bytes escape scope
Using tokio::runtime::current_thread::Runtime
: (after)
examples/image.rs:52 'run': 4384 bytes escape scope
For completeness I reverted the commit which removes the core handle to see if that alone has an effect on leaking memory. The conclusion is that it doesn't have a significant effect but I still think we should remove the handle if we don't need it.
We can remove it, I think it was required by the previous hyper async API. Can we fully drop tokio-core
from cargo manifest after this rework?
Can we fully drop
tokio-core
from cargo manifest after this rework?
After changing the occurrences in all examples etc I believe we can. Since you agree I'm going to proceed and we'll find out for sure.
@steveeJ yes, please. And thanks a lot for the rework!
@steveeJ any plan to finish this? I have some other cincinnati changes that may benefit from it.
I pushed forward the changes in your second commit, using tokio
runtime instead and completely dropping tokio-core
. Travis is green and LGTM. Please have a last look and merge if ok.
I pushed forward the changes in your second commit, using
tokio
runtime instead and completely droppingtokio-core
. Travis is green and LGTM. Please have a last look and merge if ok.
Nice, thanks for picking this one up! I had another look and couldn't spot any issues.
@lucab PTAL and let me know if I'm missing something or if the handle is indeed unused