cfallin commented on Issue #2755:
This is fantastic, thanks! I'm curious: what logging crate did you have in your environment (or was this just in wasmtime)? There was a related issue we found recently that was fixed in tokio-rs/tracing#1247; though if a similar issue occurs with e.g.
env_logger
then that's good to know too, and we should audit regalloc.rs for unnecessary expression evals in tracing!
alexcrichton commented on Issue #2755:
For posterity we had more discussion on Zulip about this and I believe that this is actually not necessary and I shouldn't have approved so quickly. I was under the impression that the arguments to logging functions were always evaluated but that is not the case. Further investigation shows that @bnjbvr's local logger may be behaving badly which was causing the slowdown here.
bnjbvr commented on Issue #2755:
Yes, the
log::max_level
was set to the highest possible value by a dependency's default ctor. Sorry for the churn, will post a revert soonish.
Last updated: Dec 23 2024 at 12:05 UTC