element-hq / element-hq/element-android

F-Droid builds rarely compact database

Open
#5,244 16 comments 0 reactions 0 assignees View on GitHub
A-Performance O-Occasional S-Major T-Defect Z-fdroid Z-Realm Z-WTF
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

### Steps to reproduce

1. With the F-Droid variant, join many large rooms (1000+ members, such as matrix-hq)
2. Notice the app storage steadily increases (this is expected due to realm's extra storage allocation)

### Outcome

#### What did you expect?
For the session store database to be compacted

#### What happened instead?

The app is currently set up to only compact the database on cold launch, however, the f-droid builds have a noop `GuardService` which forces the `Application` instance to be kept alive which means we end up skipping the compacting.

Compaction can only happen when there are no connections to the database.

### Your phone model

_No response_

### Operating system version

_No response_

### Application version and app store

1.4.0

### Homeserver

_No response_

### Will you send logs?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.