Git Product home page Git Product logo

Comments (2)

Jondolf avatar Jondolf commented on August 12, 2024

To some extent, it's expected that debug mode is over 100 times slower than release mode. This is also the case for Rapier.

You can optimize the debug mode using:

# Optimize just bevy_xpbd_2d (and probably its dependencies?)
[profile.dev.package.bevy_xpbd_2d]
opt-level = 1
# or 2 or 3 depending on how much optimization you want

As for why bevy_rapier's debug mode is faster, I believe bevy_xpbd has a higher default substep count, which gives more accuracy at the cost of performance. Lowering it from 12 to something like 6 or 4 should already give better performance. bevy_xpbd also just hasn't had as much time for optimization yet since we're still missing some quite important features.

For investigating performance, you can use Tracy or flamegraph, see Bevy's profiling docs. We also have a very simple Criterion benchmark for spawning a bunch of cubes, but that won't show how long individual systems take.

from avian.

volodalexey avatar volodalexey commented on August 12, 2024

Thanks for reply.
I tried:

[profile.dev.package.bevy_xpbd_2d]
opt-level = 3

This is enough for development, I got 20 fps for 20 entities/colliders.

from avian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.