element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.39k stars 736 forks source link

Reduce app size #3153

Open SeerLite opened 3 years ago

SeerLite commented 3 years ago

Is your feature request related to a problem? Please describe.

Half of my friends don't have phones with lots of storage space, so most of the time they have to delete something else to be able to even install Element, or they just run out of space after using it for a while when combined with the storage used by the cache.

Describe the solution you'd like.

Look into reducing the app size of Element. I understand that that isn't as easy to control as it seems but it's a real problem to many people where I live where good phones aren't as affordable. I can't just ask my friends to get a better phone or delete files, when the apps they already use for communication use a lot less storage than Element. I'd appreciate any kind of optimization to reduce the app size, if possible.

Describe alternatives you've considered.

Limiting the cache usage. I think #3045 is related to that.

Additional context

My installation of Element is 119 MB in app size, which with the cache and user data adds up to 938 MB of internal storage usage. Comparing it to WhatsApp, where the app size is just 63 MB (for me at least) and the max usage of chats (cache) has been like 300 MB at worst, it's a huge difference.


Thank you for the work on Element Android <3

kugel- commented 3 years ago

120MB for a chat app is insane

Krzmbrzl commented 3 years ago

I would also be interested as to why Element is this large. Are you using a huge framework that gets bundled into the app?

Sterrs commented 2 years ago

Hi there seems to be a bug in Element where it will consume enormous amounts of storage temporarily, see #2620. Do you think this might be something you or your friends are experiencing?

SeerLite commented 2 years ago

@Sterrs Thank you. I just checked Element's current usage on my phone and it seems to be around 600MB, so yeah, we might have encountered that in the past. I still think 600MB is a huge amount, hopefully it's also related to that bug.

gjvnq commented 2 years ago

Can anyone run an analysis of what is taking so much space and post it here so people can gradually contribute towards this ticket?