question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

F-Droid builds rarely compact database

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
opusforlife2commented, Apr 10, 2022

Update 4: I just had a long conversation and was monitoring RAM side-by-side. It went up to 700 MB. 😦

It was the only app I was using, so there was nothing to eject from RAM, but for a device with 3GB RAM, that is still too much.

1reaction
opusforlife2commented, Mar 25, 2022

Adding to https://github.com/vector-im/element-android/issues/5244#issuecomment-1065436822, @ouchadam, I have now had some long conversations on 1.4.4 as well.

GOOD NEWS: The insane 1 GB RAM hogging doesn’t happen anymore.

Bad news: Element still hovers between 300-400 MB when actively having a conversation (with 1 person in a DM). Often, it goes up to the 400-500 MB range. This is still more than Fenix, a full-fledged web browser, so I hope it can be reduced further. For a closer comparison, Telegram FOSS hovers between 100-200 MB.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reproducible Builds | F-Droid - Free and Open Source ...
F-Droid supports reproducible builds of apps, so that anyone can run the build process again and reproduce the same APK as the original...
Read more >
Shrink, obfuscate, and optimize your app - Android Developers
Learn how to shrink code in your release build to remove unused code and resources.
Read more >
Can you "compact" a SQLite database on-the-fly once it's ...
So can this be done programmatically from your Android app once it's deployed on a device? And is it common practice, or wise,...
Read more >
Never Too Rich Or Thin: Compress Sqlite 80% - Hackaday
You can select how the compression groups data which can help with performance. For example, instead of chunking together a fixed number of ......
Read more >
Upgrade from version 8 to the modular Web SDK - Firebase
doc.data() is never undefined for query doc snapshots ... with version 9 can result in 80% less kilobytes than a comparable app built...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found