Events .send_batch
makes a trace!
entry even for empty insertions
#5026
Labels
A-Diagnostics
Logging, crash handling, error reporting and performance analysis
A-ECS
Entities, components, systems, and events
C-Bug
An unexpected or incorrect behavior
Bevy version
main
What you did
When using
RUST_LOG=bevy_ecs=trace
to figure out what is going on, there is a lot of entries:These denotes empty insertions of events.
This is a minimal snippet that showcases this issue:
What went wrong
I'm not sure it is a good idea to log insertions of nothing.
Nor do I want to check for this every time I want to send off events, because this requires an allocation:
This is not a bug but I don't want to fill logging with empty insertions, and re-allocating every time
I want to send events seems wasteful.
I tried to post this on the discord first, but didn't get any traction there.
Additional information
The responsible chunk is this:
The text was updated successfully, but these errors were encountered: