timehop / sticky-headers-recyclerview

[UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView
Apache License 2.0
3.74k stars 757 forks source link

HeaderViews aren't recycled #1

Open jacobtabak opened 9 years ago

AndroidDeveloperLB commented 9 years ago

I've read it in the repo page. What does this mean? Memory leak? Performance issues?

RichardLindhout commented 8 years ago

@AndroidDeveloperLB +1

jacobtabak commented 8 years ago

@RichardLindhout It's not a memory leak, but if you have n headers, then n views will inflated and stored in memory. They will be properly garbage collected when no longer needed.

There is a small performance and memory hit the first time a header needs to be rendered, but in the grand scheme of things it doesn't make much difference.

AndroidDeveloperLB commented 8 years ago

Do they all get created at the same time, or each on its own time? And, is it possible to improve it?

jacobtabak commented 8 years ago

They are created lazily. And yes! That's why I made this issue. But as of yet nobody has considered it to be enough of a problem to spend time on.

RichardLindhout commented 8 years ago

Thanks for your fast answer! This is an amazing library!

The reason I commented +1 was because the header is flickering sometimes. I don't know if its caused by this issue.

AndroidDeveloperLB commented 8 years ago

OK, at least it doesn't have a memory leak. It can cause however, too many GCs on some cases.

djdmbrwsk commented 7 years ago

Here is my first go at implementing recycling headers - https://github.com/djdmbrwsk/sticky-headers-recyclerview