Move event traces to detailed_trace!#7732
Merged
james7132 merged 3 commits intobevyengine:mainfrom Apr 11, 2023
Merged
Conversation
danchia
approved these changes
Feb 18, 2023
Contributor
danchia
left a comment
There was a problem hiding this comment.
This generally seems like a good idea to me - this looks to be deeply engine internals logging that a user won't need to see (and they can always enable the feature flag if they must), and the EventReader seems like the kind of thing that will end up in a hot loop with many iterations.
Member
Author
|
This may have an impact outside of just user-facing events. Since #7713, this also impacts component removal: |
Member
Author
|
When setting up the benchmarks for #8251, I found nearly 5x improvements to event sending. Didn't impact event iteration. |
danchia
approved these changes
Mar 29, 2023
Contributor
|
Yikes (or yay?) 5x improvement! |
jdm
approved these changes
Apr 11, 2023
Contributor
jdm
left a comment
There was a problem hiding this comment.
Makes sense, and appreciate the benchmarks.
hymm
approved these changes
Apr 11, 2023
CGMossa
approved these changes
Apr 11, 2023
james7132
added a commit
to james7132/bevy_asm_tests
that referenced
this pull request
Apr 11, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Noticed while writing #7728 that we are using
trace!logs in our event functions. This has shown to have significant overhead, even trace level logs are disabled globally, as seen in #7639.Solution
Use the
detailed_trace!macro introduced in #7639. Also removed theevent_tracefunction that was only used in one location.Changelog
Changed: Event trace logs are now feature gated behind the
detailed-tracefeature.