element-hq / element-hq/element-ios
Lazy write data to cache
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
We can save some IO operations and perhaps avoid cache corruptions (#3921) by doing less write operationz.
We could throttle the `MXStore.commit()` operation.
We absolutely need to store to files on the initial sync response and when the app goes to back (on `MXSession.pause()`). Between, we could store only every 10s ou 30s.
Contributor guide
Research direction
Start at MXStore.commit() and MXSession.pause(), then trace where the initial sync response persists data. Determine how cache writes are triggered between those lifecycle points. Done means initial sync and pause still write immediately, while intermediate writes are throttled to the chosen interval without corrupting the cache.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100