yDelouis / selfoss-android

Android application for Selfoss
MIT License
41 stars 9 forks source link

quite a data hog? #21

Closed jonnyair closed 10 years ago

jonnyair commented 10 years ago

Hey there,

I've noticed, that the app is quite a data hog on my phone, just today it downloaded over 500mb! (luckily over wifi), see attached screenshot: screenshot_2014-07-01-17-47-05

and i barely used it (maybe 20-30 Minutes in total today). I've set the sync-interval to 15 minutes - does it download EVERYTHING EVERYTIME? Or what's the matter (my selfoss instance has a few thousand articles stored - i like to be able to look up stuff i've read a couple months before -, might that be a reason)? If you need more details, i'd be happy to help.

yDelouis commented 10 years ago

There is no way to know articles that have been updated since the last sync. That's why I'm re-downloading the last 50 articles and also the unread and starred ones. Other articles are downloaded on demand. I'm also pre-fetching article images to know which layout to use in the list. I think this is what explain that the app is using too much data. This part will be improved to fetch images only once. I will also try to submit a PR to the server part to be able to get only updated items.

Thanks for pointing out this issue. I had only 2 MB since 6 days, syncing every 15 minutes.

jonnyair commented 10 years ago

i used to have only a couple of mb, too. but somehow the traffic exploded - however it doesn't use much battery, which i would expect when it uses that much of data. i just checked: from 12th June till 29th June selfoss consumed about 250MB, from then till now: 2.2GB! hth

yDelouis commented 10 years ago

Wow sorry. I will submit a PR to be able to make a good sync with the server. In the meantime, I think I will revert the changes, unless you have a better idea.

jonnyair commented 10 years ago

i didn't check what you'd change since then (it might be a simple bug?)... unfortunately i'm in my exams right now, so i don't have much time to read your codes and see what you've done. I'll revert to v0.5.1 and keep you updated if the problem existed back in that version ;-)

yDelouis commented 10 years ago

I uploaded today a new version where pre-fetched images are cached, so that images are downloaded only once. So bandwidth consumption should be reduced. I continue to work on a PR for the server part so that the app could download only updated articles.

jonnyair commented 10 years ago

i have used the version 0.5.1 for the last two days and it only used about 50mb (the first download should've used most of it). i'm updating right now, i'll keep you posted ;-)

jonnyair commented 10 years ago

so, i've used the newest version for a few days, and the problem seems to be solved for me... :)

yDelouis commented 10 years ago

Great. Thanks !