Skip to content

Conversation

@ThierryBerger
Copy link
Contributor

@ThierryBerger ThierryBerger commented Aug 13, 2024

Related to #553

  • Adding a simple Transform wasn't enough to place correctly the cubes, which made the scene having way too many exploding collisions, which was the main source of bad performance detected in Added initial benchmarks #551.
    • Now the performance is more comparable to rapier testbed benchmark. There is a overhead but not a horrible one:
      • bevy takes ~5 seconds to boot up, not sure exactly why, we might be able to strip a few plugins (bevy_render, window... ) but I didn´t succeed, async-collider was complaining, even though I believe I deactivated it 🤔.
      • on 1000 iteration on 40 pyramids with 20 height, bevy takes 26 seconds once booted up where rapier takes 20 seconds. So there is still room for improvement.
  • I also added a feature "visual" to more easily see what the benchmark is doing. it's mostly meant to be used while working on the benchmarks, enabling only 1. We cannot run them sequentially because bevy_winit doesn´t support window recreaction.

pub fn custom_bencher(steps: usize, setup: impl Fn(&mut App)) {
let mut app = default_app();
setup(&mut app);
#[cfg(feature = "visual")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add explaination to readme

Copy link
Member

@sebcrozet sebcrozet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need the README update for the visual feature, but looking good overall. Thanks!

rapier3d = { features = ["profiler"], version = "0.22" }
bevy_rapier3d = { version = "0.27", path = "../bevy_rapier3d" }
bevy = { version = "0.14", default-features = false }
rapier3d = { features = ["profiler"], version = "0.22" }
Copy link
Member

@sebcrozet sebcrozet Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reminds me that I’d like to revisit that profiler thing in rapier to switch so something less manual. Like switching the tracy or something. (This is unrelated to this PR though.)

and outputs them at the end.

```sh
cargo run --release --bin bench
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running cargo run --release --bin bench from the root brings all dependencies, but running this from bevy_rapier_benches3d brings only the needed ones, this may be worth a note (and I'd like to understand why.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants