-
Notifications
You must be signed in to change notification settings - Fork 185
Outline all tracing events #942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outline all tracing events #942
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #942 will improve performances by 7.21%Comparing Summary
Benchmarks breakdown
|
a23c6f1
to
5209fe0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative to this could be something like bevyengine/bevy#7639
So that the logs can be removed statically at compile time. It may require us to fine tune some of the log levels used by salsa
Personally, I don't recommend it. We made a mistake using cargo's features to compile out |
Can you say more? How would a RUSTFLAGS approach work? |
Cargo features are additive and therefore unify across the crate graph, while
Take a look at Tokio's usage; I think the examples are pretty solid. |
Oh interesting. Thanks for explaining. I wasn't aware that |
I realized that the FWIW Tracing also has |
We use this in ty for |
I realized that |
Alternatively, we could make the assumption that the logging filters do not change across calls to salsa (e.g. you aren't using scoped subscribers for different queries), at least within the same thread, and cache the check. |
That’s unironically the unofficial
iirc, tracing should be doing something similar to internally. by the way of example, i think compile-time filters only have rustc about 1%, and that’s because rustc does a lot of per-process invocations, but Salsa is typically used in long-lived processes. |
Actually it does those last two steps twice (tokio-rs/tracing#3342)! Switching to the |
7e75263
to
e982eb8
Compare
I reverted the last commit, so this just uses |
Oh no... you just demonstrated that there's still a salsa concurrency bug
Edit: Never mind, that's the one we are aware of ( |
It doesn't make sense for these to be inlined as they're typically disabled anyways.