bevy/crates/bevy_transform
Nathan Ward ecb78048cf [ecs] Improve Commands performance (#2332)
# Objective

- Currently `Commands` are quite slow due to the need to allocate for each command and wrap it in a `Box<dyn Command>`.
- For example:
```rust
fn my_system(mut cmds: Commands) {
    cmds.spawn().insert(42).insert(3.14);
}
```
will have 3 separate `Box<dyn Command>` that need to be allocated and ran.

## Solution

- Utilize a specialized data structure keyed `CommandQueueInner`. 
- The purpose of `CommandQueueInner` is to hold a collection of commands in contiguous memory. 
- This allows us to store each `Command` type contiguously in memory and quickly iterate through them and apply the `Command::write` trait function to each element.
2021-07-16 19:57:20 +00:00
..
src [ecs] Improve Commands performance (#2332) 2021-07-16 19:57:20 +00:00
.gitignore move bevy crates to their own folder 2020-04-24 17:57:20 -07:00
Cargo.toml Move to smallvec v1.6 (#2074) 2021-05-05 19:14:39 +00:00
LICENSE move bevy crates to their own folder 2020-04-24 17:57:20 -07:00
README.md transform: remove some dependencies and cleanup 2020-07-10 01:49:23 -07:00

Bevy Transform

This crate is largely a 1:1 port from legion_transform (ecs: legion, math: nalgebra) to bevy (ecs: bevy_ecs, math: glam)