2

I'm implementing EpoxyRecyclerView with EpoxyController.

Since my use case calls for recreation and diffing of models pretty rapidly (on the order on 100 models each second or so), I'm worried about memory churn from the great amount of (relatively complex) EpoxyModels. And so I'm looking into a pooling solution for them.

Which brings me to my question: when/where to return the models to the pool?

Models are taken from the pool, populated and sent to Controller via setData(), which replaces the model list and calls requestModelBuild(). I'm thinking of saving the old model list in setData() and returning them to the pool once build is done and onModelBuildFinished() is called on the model build listener. Would that work? Is Epoxy done with old models at the point?

jpop
  • 1,094
  • 1
  • 7
  • 19

0 Answers0