I’m developing for Android.
I have 2 databases and I have 2 Android Activities so for each Activity I need to obtain different kind of documents from both of the databases. I have predefined in twos Views and twos LiveQueries dedicated to each Activity. Since only one of Activity can work at the same time (I don’t need to receive changes for inactive Activity), I stop LiveQueries dedicated to the inactive Activity.
RecyclerView is exactly what I’m using in both Activities.
Also while the one of Activities always requests one type of documents, the other one may requests the different type of documents.
The problem happens when some changes happen in the databases. I have some kind of adapter class for each document. If I have hundreds of documents, I have to recreate this adapter for each document.
That’s why I’m interested in the changes only. Of course, I can make some optimizations with the adapter class to reuse the oldest objects. Also I tried to find only changed documents from LiveQueries by myself, but for me it looks like my application and Couch have the same copies of documents, so this will cause a redundant memory usage.