element-hq / element-hq/element-ios
SDK: MXSession can wedge in processing of /sync on startup
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
`[MXSession] Received ...` and ` [MXSession] preloadRooms ...` in the following logs are displayed from the same function, the one that processes the `/sync` response. It is executed on the main thread and can block the UI.
Unfortunately, this method does and delegates a lot of things and there is not enough logs to determine the culprit.
I was not able to repro the issue. The issue has been seen 2 times in a row and no more happens.
- https://github.com/matrix-org/riot-ios-rageshakes/issues/1730 (https://riot.im/bugreports/listing/2018-12-13/094343/console.log.gz)
```
2018-12-13 09:42:27.907 Riot[402:73360] [MXHTTPClient] Background task #103 is complete
2018-12-13 09:42:27.907 Riot[402:73360] [MXSession] Received 29 joined rooms, 0 invited rooms, 0 left rooms, 0 toDevice events in 6554ms
2018-12-13 09:42:30.879 Riot[402:73360] [MXRoomSummary] roomDidFlushData: !boLskYiwabbCQNNhlK:sw1v.org
2018-12-13 09:42:30.880 Riot[402:73360] [MXFileStore commit] Ignore it. There are already pending commits
2018-12-13 09:42:35.305 Riot[402:73360] [MXSession] preloadRooms: 29 rooms
2018-12-13 09:43:09.549 Riot[402:73360] [MXKViewController] BugReportViewController viewDidAppear
```
- https://github.com/matrix-org/riot-ios-rageshakes/issues/1731 (https://riot.im/bugreports/listing/2018-12-13/101325/console.log.gz)
```
2018-12-13 10:12:06.539 Riot[402:73360] [AppDelegate] applicationWillEnterForeground
2018-12-13 10:12:08.589 Riot[402:73360] [MXSession] Received 19 joined rooms, 0 invited rooms, 0 left rooms, 0 toDevice events in 1063ms
2018-12-13 10:12:15.137 Riot[402:73360] [MXSession] preloadRooms: 19 rooms
2018-12-13 10:12:15.195 Riot[402:73360] [MXSession] preloadRoomsForSyncResponse: DONE
2018-12-13 10:13:14.874 Riot[402:73360] [MXKViewController] BugReportViewController viewDidAppear
```
Contributor guide
Assessment
This issue has not been assessed yet.