Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Significant unexplainable foreground bandwidth usage #625

Closed
joopdo opened this issue Sep 27, 2023 · 3 comments
Closed

[BUG] Significant unexplainable foreground bandwidth usage #625

joopdo opened this issue Sep 27, 2023 · 3 comments

Comments

@joopdo
Copy link

joopdo commented Sep 27, 2023

Describe the bug
Not sure if this warrants a bug but sharing as it would put off new users. I installed Amethyst this morning and used 700MB of data in about 30 minutes time. Way more then I expected, also the phone got warm and Amethyst used 8% of battery.

To Reproduce
Steps to reproduce the behavior:

  1. Download Amethyst from F-droid
  2. Login using key
  3. Click around all functions in footer (threads, known, global, live, notifications
  4. Then in home I clicked around some profiles and followed accounts (about 15)
  5. Battery depleted >5% and phone started running hot, kill app

Expected behavior
I wasn't watching video (in retrospect, maybe it ran in background or something), I was just loading profile pics and text, should be less then 50MB or so.

Video and Screenshots
None

Device (please complete the following information):

  • CalyxOS on Pixel 4
  • Android Version [e.g. 33]: 13
  • App Version [e.g. v0.20.3]: 0.77.0
@vitorpamplona
Copy link
Owner

Frankly, I am surprised the app even runs on the old Pixel 4. Nothing is optimized for that hardware. Not even the UI elements we use (Jetpack Compose) work well in that generation of processors.

The use of data is not that difficult to achieve. Many profile pictures people are using are 10-50MB each these days, especially the animated ones. Since we don't have a centralizing image proxy to reduce that image size, the phone downloads it raw. All videos and images are downloaded at full size. The live tab, for instance, will download part of the videos just to know if the streams are online or not before you click on them. Then each language model pair of the languages you see on the screen is about 20-40MB. This enables the automated translations. Finally, because you just started the app, it downloads ALL your messages and the last 4000 posts and notifications of your user. If you visit a user's profile, more stuff is downloaded from that user. Badges, for instance, are incredibly heavy images. Things like following/follower views are also quite heavy Nostr objects. Of course, it all gets multiplied by the amount of relays you use.

So, depending on how much you went around, 700MB is actually quite low for the data usage side of things.

The hot part is probably due to the download and verification of all events. Many Nostr apps don't verify what they download to reduce this processing need. We verify everything, including notifications. That plus the need to constantly watch for updates on all feeds to bring notifications up + the save of many new profile pictures in a row can lead to a warm phone in these older models.

We are constantly trying to decrease the amount of usage, but with everything the app does, it's getting harder and harder over time.

@joopdo
Copy link
Author

joopdo commented Sep 27, 2023

Thank you for the explanation @vitorpamplona, as this amount is no surprise and no need to assist in logging etc, I'll close the ticket.

@joopdo joopdo closed this as completed Sep 27, 2023
@vitorpamplona
Copy link
Owner

Let's hope we can keep making improvements in reducing this usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants