matrix-org / matrix-org/matrix-js-sdk
High memory usage when joining large rooms
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 704
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 40
Description
**Describe the bug**
The SDK consumes too much memory when used with an account with which has joined large rooms.
**To Reproduce**
Steps to reproduce the behavior:
With this SDK, login into one of your accounts which has joined a large room(with a few hundreds of members for example). Soon you'll see the SDK is "eating" a few hundred MBs of memory which is too much for my application.
**Expected behavior**
It should eat less :)
**Smartphone (please complete the following information):**
- Device: Nokia 8110 4G(Has got 512MB RAM)
- OS: KaiOS 2.5.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with an account joined to a room with a few hundred members, using the SDK on KaiOS 2.5.1 or a comparable constrained device. Profile memory during login and room synchronization to identify the source of the growth. Done means the same large-room scenario uses substantially less memory without breaking room functionality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100