You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an object falls indefinitely, the memory usage of Rapier will increase steadily. This is likely caused by the broad-phase allocating empty grid cells traversed by the falling object.
We should see if there is a way to automatically free the empty broad-phase grid cells without any performance impact.
The text was updated successfully, but these errors were encountered:
As a user, I would say that whether one wants to release empty cells depends on the application: if the world is bounded and small, one wants to keep empty cells to avoid repeating de-allocation and re-allocation. If the world is unbounded or large, one wants to free empty cells, possibly after a give unused time. Of course, if the de-allocation is very cheap, de-allocating cells every time a contained object counter reaches 0 seems acceptable. If it is not that cheap, maybe it is best to leave the decision to the user, either through a global flag enabling automatic freeing of empty cells, or through an explicit cell garbage collection call.
Letting the user decide sounds like a good idea. We can either add a parameter to the broad-phase constructor, or enable the de-allocation by default (to avoid any surprises memory-wise) and add a method to let the user disable it explicitly.
If an object falls indefinitely, the memory usage of Rapier will increase steadily. This is likely caused by the broad-phase allocating empty grid cells traversed by the falling object.
We should see if there is a way to automatically free the empty broad-phase grid cells without any performance impact.
The text was updated successfully, but these errors were encountered: