Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix benchmark #577

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Vrixyz
Copy link
Contributor

@Vrixyz Vrixyz 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.

@Vrixyz Vrixyz requested a review from sebcrozet August 30, 2024 14:45
@@ -14,6 +14,11 @@ use bevy_rapier3d::plugin::RapierContext;
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!

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.)

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