Open arturoc opened 4 years ago
Hi!
Thank you for the test case. After some benchmarking, it appears the performance regression is caused by that line self.garbage_collect_ids(interactions)
.
The fact that it iterates through all the contacts may be quite expensive.
The version 0.19 did not have this because the removal of unused contact ids was done directly by the contact generator. This has been modified that way in prevision of the parallelization of the narrow phase. Though we'll have to think of another method to avoid this performance impact.
After porting an application from 0.19 to 0.22 calling
CollisionWorld::update
after updating the positions of some objects is much slower than before, what used to take 0.3ms is now taking 1.2ms.I've done a quick benchmark and what runs in 0.19 with nalgebra 0.18 in less than 3ms takes 12ms to run on 0.22 with nalgebra 0.20:
just uncomment the correct versions in the following cargo.toml and change the default features from old to new to test 0.22 instead of 0.19:
Cargo.toml
lib.rs: