Skip to content

Commit 5243fe6

Browse files
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.
1 parent b2529bf commit 5243fe6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

crates/bevy_ui/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ impl Plugin for UiPlugin {
166166
PostUpdate,
167167
(
168168
check_visibility::<WithNode>.in_set(VisibilitySystems::CheckVisibility),
169-
(update_target_camera_system, apply_deferred)
170-
.chain()
171-
.in_set(UiSystem::Prepare),
169+
update_target_camera_system.in_set(UiSystem::Prepare),
172170
ui_layout_system
173171
.in_set(UiSystem::Layout)
174172
.before(TransformSystem::TransformPropagate),

tests/ecs/ambiguity_detection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn main() {
3333
// Over time, we are working to reduce the number: your PR should not increase it.
3434
// If you decrease this by fixing an ambiguity, reduce the number to prevent regressions.
3535
// See https://github.com/bevyengine/bevy/issues/7386 for progress.
36-
72,
36+
48,
3737
"Main app has unexpected ambiguities among the following schedules: \n{:#?}.",
3838
main_app_ambiguities,
3939
);

0 commit comments

Comments
 (0)