-
Notifications
You must be signed in to change notification settings - Fork 36
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
Garbage collection - step() #36
Comments
I implemented an experimental hack which can be enabled with: This reuses a number of objects, including the large collision used in the stepper. Could someone have a look whether it improves the situation on Android? We could apply the same approach to other places in the code. |
It looks like some improvement has been recently made in ODE too - see https://bitbucket.org/odedevs/ode/commits/506a3b3b93c2ef0da3e5030bf12e408aef59c2cd |
Yes, they seem to avoid allocating Has anyone seen a measurably reduced GC load from my initial patch? |
As mentioned in issue #35, ode4j appears to allocate significant amounts of memory in some situations/systems ("3-4 MB/s").
The problem may be in the stepper which allocates large arrays for the solver during each step.
A solution could involve array pooling.
The text was updated successfully, but these errors were encountered: