element-hq / element-hq/element-ios
Initial sync at launch too slow, seems to be hanging on key query
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
- When initially launching the app, the first sync takes a long time (over 15 seconds).
- This does not happen with other clients (Fluffy Chat, or Element desktop)
- Analyzing the connection with mitm-proxy, it appears the source of the sync hang is caused by waiting for a return from `/_matrix/client/r0/keys/query`
### Outcome
#### What did you expect?
For the initial sync not to hang up the launch of the app
#### What happened instead?
The initial sync takes way too long
### Your phone model
iPhone 12 Pro
### Operating system version
iOS 16.5
### Application version
Element 1.10.8
### Homeserver
private Dendrite v0.12.0
### Will you send logs?
Yes
Contributor guide
Research direction
Reproduce the initial launch sync on an iPhone 12 Pro or equivalent against the reported private Dendrite setup, and inspect the request to `/_matrix/client/r0/keys/query` with a proxy. Compare its timing with the other clients mentioned in the report. Done means the initial sync no longer blocks launch for more than 15 seconds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100