You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read receipts processing dramatically slows down UI.
The method getEventReceipts:eventId:sorted: from the MXMemoryStore is really time consuming. Unfortunately this method is called on main thread very often. This issue increases with the number of participants.
Here a sample from Time Profiler showing the time spent in the main thread especially the high percentage:
Solutions:
Make call to getEventReceipts:eventId:sorted: asynchronously in background and then refresh UI. Needs to rewrite every calls to this method from Riot to handle asynchronous code. Room cells read receipt update should be done separately from other informations.
Store only read receipts for visible messages to avoid processing thousands of unnecessary read receipts.
Improve Matrix SDK cache performance by using an ORM framework like Realm or Core Data. With the amount of data, the different relationships and multithreading, simply using arrays and dictionaries to managing data sounds complex and error prone.
To me we should lazily retrieve read receipts and use an ORM framework like Realm.
The text was updated successfully, but these errors were encountered:
SBiOSoftWhare
changed the title
Read receipts processing slows down UI
Read receipts processing dramatically slows down UI
Jun 7, 2018
Read receipts processing dramatically slows down UI.
The method
getEventReceipts:eventId:sorted:
from theMXMemoryStore
is really time consuming. Unfortunately this method is called on main thread very often. This issue increases with the number of participants.Here a sample from Time Profiler showing the time spent in the main thread especially the high percentage:
Solutions:
getEventReceipts:eventId:sorted:
asynchronously in background and then refresh UI. Needs to rewrite every calls to this method from Riot to handle asynchronous code. Room cells read receipt update should be done separately from other informations.To me we should lazily retrieve read receipts and use an ORM framework like Realm.
The text was updated successfully, but these errors were encountered: