![]() # Objective 1. Reduce overhead from error handling for ECS commands that intentionally ignore errors, such as `try_despawn`. These commands currently allocate error objects and pass them to a no-op handler (`ignore`), which can impact performance when many operations fail. 2. Fix a hang when removing `ChildOf` components during entity despawning. Excessive logging of these failures can cause significant hangs (I'm noticing around 100ms). - Fixes https://github.com/bevyengine/bevy/issues/19777 - Fixes https://github.com/bevyengine/bevy/issues/19753 <img width="1387" alt="image" src="https://github.com/user-attachments/assets/5c67ab77-97bb-46e5-b287-2c502bef9358" /> ## Solution * Added a `ignore_error` method to the `HandleError` trait to use instead of `handle_error_with(ignore)`. It swallows errors and does not create error objects. * Replaced `remove::<ChildOf>` with `try_remove::<ChildOf>` to suppress expected (?) errors and reduce log noise. ## Testing - I ran these changes on a local project. |
||
---|---|---|
.. | ||
bevy_error.rs | ||
command_handling.rs | ||
handler.rs | ||
mod.rs |