matrix-org / matrix-org/matrix-ios-sdk

Implement MXRealmStore

Open
#321 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
484
Forks
225
PR merge metrics
No merged PRs in 30d

Description

Implement MXStore with https://realm.io.

A prototype has been done to test storing of rooms states, which makes a lot of IO accesses with MXFileStore.

With MXFileStore, the first write and every change in Matrix HQ state takes 2.4s on my 5s
With Realm, the first write of 13k state events takes 4.4s but next updates take few ms

Time to store Matrix HQ state | First write (ms) | Update of a single state event (ms)
-|-|-
MXFileStore | 2400 | 2400
Realm hack | 4400 | few

From the 1st update, Realm is the winner.

Loading seems similar in both cases.

Implementation has been started at https://github.com/matrix-org/matrix-ios-sdk/tree/MXRealmStore.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the MXRealmStore branch and comparing its prototype with MXFileStore. Trace how room states are stored and updated, then verify that the Realm implementation covers the required Matrix HQ state operations and preserves comparable loading behavior. The issue provides performance observations but no specific test or acceptance command.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
database, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.