UI Lists' lag
Opened this issue · 2 comments
markzyu commented
The cause seems to be loading Realm in UI Thread. However, even if loading Realm in UI is avoided, the asynchronous procedure of refreshing any list item just due to scrolling is not acceptable.
We could fix this by loading full data in before enabling ListAdapters or rendering lists.
markzyu commented
An example of such an issue appears in MainBillFragment. It was solved in f5f1b28.
But we still have many other fragments to fix.
markzyu commented
Steps:
- Change a function signature in some
IView
: avoid passing inRawXXX
and passShownXXX
instead, which should contain all the data needed to inflate the view (it's fine for images to be given by URL, though) - Fix related function implementations. And move the code fetching extra data from Views to Presenters.