Q: Nested recyclerview in recyclerview performance I've got a recyclerview which lists a number of group items. Below each group item I would like to have another recyclerview with a grid layout of x number of items (up to like a hundred or two).
I've achieved this, however the performance when expanding a group item is horrible. This is due to the nested recyclerview that seem to be rendering all of it's children, instead of just the ones visible at the expanding time.
Can someone point me in the direction of how to fix this behaviour? I want the recyclerview child to only render and compute the currently visible items, just as the parent recyclerview is doing. Or should I begin looking at not nesting recyclerviews and instead create my own grid of layouts with viewgroup children?

A: I think this project will help you:
https://github.com/h6ah4i/android-advancedrecyclerview

A: I think this library can help you:
https://github.com/luizgrp/SectionedRecyclerViewAdapter
You can group your items in sections and it doesn't use nested RecyclerViews.
You can find an example with grid here, and you can make it expandable just copying the 'expanded' flag from this example here.
I've made a test with hundreds of grid items and a expand/collapse button and the performance was fine.
