Skip to content

Conversation

@Aceeri
Copy link
Contributor

@Aceeri Aceeri commented Sep 27, 2023

Unsure of whether this will have a noticeable performance improvement currently. I would like to do some benchmarks on how writeback performs.

I think the bigger thing here would be to not use bevy's transform propagation/GlobalTransform and instead adapt it to our case where we update a PhysicsTransform that is more akin to the old pre-0.8 bevy GlobalTransform. This would also allow us to not update unrelated entities.

@Aceeri Aceeri marked this pull request as draft September 28, 2023 14:02
@Aceeri
Copy link
Contributor Author

Aceeri commented Sep 28, 2023

It seems that this gives a ~22% performance increase in the writeback system when profiling the boxes3 example. So seems worthwhile from initial benchmarks.

@Aceeri Aceeri marked this pull request as ready for review September 28, 2023 15:32
@sebcrozet
Copy link
Member

sebcrozet commented Sep 30, 2023

Thank you for this PR! Is there a particular reason why the .tracy files were pushed?

I’m very surprised this improves performances. Doesn’t bevy recommend iterating on bodies rather than random access through Query::get? Does bevy’s Query::iter_mut involves a large overhead?

@Aceeri
Copy link
Contributor Author

Aceeri commented Oct 3, 2023

.tracy files were unintentional sorry about that!

Yeah I wasn't expecting this to do anything honestly, I was just testing this out for the sake of the TODO comment. I'll probably investigate a bit more later on because realistically this shouldn't have any performance effect.

@ThierryBerger ThierryBerger added D-Difficult Needs strong technical background, domain knowledge, or impacts are high, needs testing... P-High arbitrary important item A-Integration very bevy specific C-Enhancement New feature or request labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Integration very bevy specific C-Enhancement New feature or request D-Difficult Needs strong technical background, domain knowledge, or impacts are high, needs testing... P-High arbitrary important item

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants