-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Inefficient use of heap causes frequent gc #367
Comments
Indeed, |
Ok. Perhaps it (pthread) will be more cleanest solution. Thanks. |
Assuming that each |
Hi! You can also use the Handler-based approach, to schedule decode operations. I think, the drawable can be free from liability by threads-managing. You are also not required to return to the main thread explicitly: |
I like this library, thanks to the authors for their labor ;)
And sorry for my bad english.
In my project i have a grid of gif's (about 4x5, may be less) and today I was faced with frequent "gc-calls", and ever-growing using-heap. I discovered an issue in draw-method of gif-drawable.
mRenderTaskSchedule = mExecutor.schedule(mRenderTask, renderDelay, TimeUnit.MILLISECONDS);
Unfortunaly, java's native ScheduledThreadPoolExexcutor.schedule creates new objects, wrappers,...etc ever call
I think it makes sense to make the mRenderTaskSchedule reusable, or create any EfficientScheduledExecutor implementation, via reflections, may be jni reflections or other workarounds
Thanks.
The text was updated successfully, but these errors were encountered: