element-hq / element-hq/element-ios
App can be slow to incremental sync
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
As per the log below on 1.6.1.
The server response was slow (this is a known cache expiration issue in synapse) but the app tried to sync only after 6 seconds.
```
# First log - App starts
2021-10-03 09:55:54.233 Riot[65448:5771531] [MXLogger] redirectNSLogToFiles: YES
# First sync request
2021-10-03 09:56:01.312 Riot[65448:5771531] [MXHTTPClient] #7 - GET _matrix/client/r0/sync
# The slow response from the homeserver
2021-10-03 09:56:08.056 Riot[65448:5771531] [MXHTTPClient] #7 - GET _matrix/client/r0/sync completed in 6743ms
# Total time to remove the grey spinner
2021-10-03 09:56:09.867 Riot[65448:5771531] [MXSession] Events stream resumed in 8555ms
2021-10-03 09:56:09.867 Riot[65448:5771531] [MXKAccount] @Manu:matrix.org: The session is ready. Matrix SDK session has been started in 15351ms.
Contributor guide
Research direction
Start by tracing the startup flow through MXSession and MXKAccount, using the _matrix/client/r0/sync log entries and their timestamps as the initial evidence. Done means the unexplained delay between the slow sync response and the resumed event stream is identified and addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100