mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 18:13:10 +00:00
eaeba0866d
# Objective Fixes #4697. Hierarchical propagation of properties, currently only Transform -> GlobalTransform, can be a very expensive operation. Transform propagation is a strict dependency for anything positioned in world-space. In large worlds, this can take quite a bit of time, so limiting it to a single thread can result in poor CPU utilization as it bottlenecks the rest of the frame's systems. ## Solution - Move transforms without a parent or a child (free-floating (Global)Transform) entities into a separate parallel system. - Chunk the hierarchy based on the root entities and process it in parallel with `Query::par_for_each_mut`. - Utilize the hierarchy's specific properties introduced in #4717 to allow for safe use of `Query::get_unchecked` on multiple threads. Assuming each child is unique in the hierarchy, it is impossible to have an aliased `&mut GlobalTransform` so long as we verify that the parent for a child is the same one propagated from. --- ## Changelog Removed: `transform_propagate_system` is no longer `pub`.
24 lines
850 B
TOML
24 lines
850 B
TOML
[package]
|
|
name = "bevy_transform"
|
|
version = "0.9.0"
|
|
edition = "2021"
|
|
description = "Provides transform functionality for Bevy Engine"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[dependencies]
|
|
# bevy
|
|
bevy_app = { path = "../bevy_app", version = "0.9.0" }
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.9.0", features = ["bevy_reflect"] }
|
|
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.9.0" }
|
|
bevy_math = { path = "../bevy_math", version = "0.9.0" }
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.9.0", features = ["bevy"] }
|
|
serde = { version = "1", features = ["derive"], optional = true }
|
|
|
|
[dev_dependencies]
|
|
bevy_tasks = { path = "../bevy_tasks", version = "0.9.0-dev" }
|
|
|
|
[features]
|
|
serialize = ["dep:serde", "bevy_math/serialize"]
|