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

Sim step slowing down #350

Open
ghost opened this issue Jul 14, 2023 · 7 comments
Open

Sim step slowing down #350

ghost opened this issue Jul 14, 2023 · 7 comments
Assignees

Comments

@ghost
Copy link

ghost commented Jul 14, 2023

I have about 1000 box colliders, but they're all (a) static and (b) not set to collide with each other. However the world step has gotten very slow. Is RP3D not ok with large numbers of objects in general?

@programingman
Copy link

Are any of the objects moving? Or is the whole scene static?
Can you profile the code to see where time is being spent?
Also make sure you're testing a Release build. Debug builds have extra overhead which make the program much slower.

Let me know if you need help figuring out how to profile the program.

@ghost
Copy link
Author

ghost commented Jul 15, 2023

They're static. But yes I'm in debug mode. Maybe I need to compile rp3d in release and my code in debug. I'll run gprof though and see what comes out.

@ghost
Copy link
Author

ghost commented Jul 15, 2023

Can I disable the debugging stuff while remaining in non-release build?

@programingman
Copy link

You can enable optimization (eg -O2 or -O3) on the rp3d Debug library, but mixing Debug and Release builds isn't recommended, if it will compile at all.

@ghost
Copy link
Author

ghost commented Jul 16, 2023

Thanks. I turned off debug drawing - are there any other options like that I might have missed that are on by default?

@ZeunO8
Copy link

ZeunO8 commented Jul 22, 2023

Try profiling with the orbit profiler to find out where most of the time is being spent.!

@DanielChappuis
Copy link
Owner

Have you already tried the last release of the library (version v0.10.0)?. I have made a change that has improved a lot the performance of static bodies.

@DanielChappuis DanielChappuis self-assigned this Jun 14, 2024
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

No branches or pull requests

3 participants