From 5243fe69565ae6f30a8018d0e027f3d66f99d84b Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Thu, 15 Aug 2024 16:51:25 -0400 Subject: [PATCH] Remove manual `apply_deferred` in `bevy_ui` (#14768) # Objective This `apply_deferred` doesn't seem to have any effect, pointlessly restricts parallelism and is responsible for a large number of system order ambiguities. Spotted as part of #7386. ## Solution Remove it. This is the *only* manual apply_deferred in the code base currently. ## Testing I've checked various UI examples and `split_screen`, and couldn't discern any difference. This looks like a remnant of a `(a, apply_deferred, b).chain()` pattern where `b` got removed, leaving us with a weird vestige. --- crates/bevy_ui/src/lib.rs | 4 +--- tests/ecs/ambiguity_detection.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ui/src/lib.rs b/crates/bevy_ui/src/lib.rs index fcfbc4065f..44eacb51af 100644 --- a/crates/bevy_ui/src/lib.rs +++ b/crates/bevy_ui/src/lib.rs @@ -166,9 +166,7 @@ impl Plugin for UiPlugin { PostUpdate, ( check_visibility::.in_set(VisibilitySystems::CheckVisibility), - (update_target_camera_system, apply_deferred) - .chain() - .in_set(UiSystem::Prepare), + update_target_camera_system.in_set(UiSystem::Prepare), ui_layout_system .in_set(UiSystem::Layout) .before(TransformSystem::TransformPropagate), diff --git a/tests/ecs/ambiguity_detection.rs b/tests/ecs/ambiguity_detection.rs index 66915c6f6d..57adee3174 100644 --- a/tests/ecs/ambiguity_detection.rs +++ b/tests/ecs/ambiguity_detection.rs @@ -33,7 +33,7 @@ fn main() { // Over time, we are working to reduce the number: your PR should not increase it. // If you decrease this by fixing an ambiguity, reduce the number to prevent regressions. // See https://github.com/bevyengine/bevy/issues/7386 for progress. - 72, + 48, "Main app has unexpected ambiguities among the following schedules: \n{:#?}.", main_app_ambiguities, );