{"action":"created","issue":{"url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/264","repository_url":"https://api.github.com/repos/android10/Android-CleanArchitecture","labels_url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/264/comments","events_url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/264/events","html_url":"https://github.com/android10/Android-CleanArchitecture/issues/264","id":294116771,"number":264,"title":"Clean Architecture with Large Cursor","user":{"login":"St4B","id":2396438,"avatar_url":"https://avatars1.githubusercontent.com/u/2396438?v=4","gravatar_id":"","url":"https://api.github.com/users/St4B","html_url":"https://github.com/St4B","followers_url":"https://api.github.com/users/St4B/followers","following_url":"https://api.github.com/users/St4B/following{/other_user}","gists_url":"https://api.github.com/users/St4B/gists{/gist_id}","starred_url":"https://api.github.com/users/St4B/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/St4B/subscriptions","organizations_url":"https://api.github.com/users/St4B/orgs","repos_url":"https://api.github.com/users/St4B/repos","events_url":"https://api.github.com/users/St4B/events{/privacy}","received_events_url":"https://api.github.com/users/St4B/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-03T14:54:25Z","updated_at":"2018-02-19T07:05:34Z","closed_at":null,"author_association":"NONE","body":"I have an app that has a recyclerview. The recyclerview loads data using an custom adapter. If we set in our adapter a cursor with large data (For example 3000 rows) the recyclerview scrolls smoothly. If we set in our adapter a list of objects (even a small amount, like 500 objects) the recyclerview lags on scroll. I suppose that the reason is that we consume a lot of resources by this approach and also the cursor uses a window and not a reference to all the data.\r\n\r\nMy question is how to handle this situation? Before using clean architecture i just passed the cursor to the recyclerview and everything worked ok. After using rxJava I create an object in every onNext call and keep them in a list.\r\n\r\nAlso there is another problem. The domain layer does not have reference to android classes. As a result I can not have Observable <Cursor> in order to pass it to presentation layer. Is the best way to keep an unchecked observable? Is there any different approach (For example any rxJava operator)?"},"comment":{"url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/comments/366604464","html_url":"https://github.com/android10/Android-CleanArchitecture/issues/264#issuecomment-366604464","issue_url":"https://api.github.com/repos/android10/Android-CleanArchitecture/issues/264","id":366604464,"user":{"login":"bohsen","id":355452,"avatar_url":"https://avatars3.githubusercontent.com/u/355452?v=4","gravatar_id":"","url":"https://api.github.com/users/bohsen","html_url":"https://github.com/bohsen","followers_url":"https://api.github.com/users/bohsen/followers","following_url":"https://api.github.com/users/bohsen/following{/other_user}","gists_url":"https://api.github.com/users/bohsen/gists{/gist_id}","starred_url":"https://api.github.com/users/bohsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bohsen/subscriptions","organizations_url":"https://api.github.com/users/bohsen/orgs","repos_url":"https://api.github.com/users/bohsen/repos","events_url":"https://api.github.com/users/bohsen/events{/privacy}","received_events_url":"https://api.github.com/users/bohsen/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T07:05:34Z","updated_at":"2018-02-19T07:05:34Z","author_association":"NONE","body":"If your project is relatively new without too much legacy code, your should consider using Android Architecture Components. In there you will find Room for handling database access and the pagination library for doing the load. These can seriously shave some complexity off the database handling. Take a look here: https://developer.android.com/topic/libraries/architecture/paging.html"}}
{"actor":{"display_login":"bohsen"}}