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
Every time a scroll occurs, ItemTransformation objects are created per view per scroll. This use of creating many ItemTransformation objects a lot of the time, it makes the GC fire off many times and therefore, you see jank. If an object pool is used, it would mean that the GC won't be fired constantly.
This would look something like adding a method to ItemTransformation.obtain(scaleX,scaleY,translationX,translationY) and using an object pool internally to get objects. Then once it's been used, just call release method on object and that tells the system it can be recycled.
Love this lib! It's brilliant!
Every time a scroll occurs,
ItemTransformation
objects are created per view per scroll. This use of creating manyItemTransformation
objects a lot of the time, it makes the GC fire off many times and therefore, you see jank. If an object pool is used, it would mean that the GC won't be fired constantly.This would look something like adding a method to
ItemTransformation.obtain(scaleX,scaleY,translationX,translationY)
and using an object pool internally to get objects. Then once it's been used, just callrelease
method on object and that tells the system it can be recycled.Colt McAnlis explains the concept here: https://www.youtube.com/watch?v=bSOREVMEFnM
What do you think? Is it something worth exploring?
The text was updated successfully, but these errors were encountered: