nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.28k stars 1.77k forks source link

Cache size #596

Open tobiasKaminsky opened 7 years ago

tobiasKaminsky commented 7 years ago

The current cache size is 10Mb which is way to small for any larger photo collection. There is a PR (#144) which allows to manually resize the cache. I think this is not the best idea as the user has to do it manually, so this might be there as a fallback.

In https://github.com/nextcloud/android/issues/177#issuecomment-236945762 this was proposed:

Every time the apps starts the cache size will be checked and adjusted.

mario commented 7 years ago

Easy - every time you open the app. :)

Bullnados commented 7 years ago

You wrote "storage size of the device", that means just internal storage? Will the manual option disapear? Will be also a max cache size?

tobiasKaminsky commented 7 years ago

Cache is always on internal storage, as far as I know. Manual option will be removed as it is currently only in nightly version. max cache is 5% of internal space.

elpraga commented 7 years ago

Does it mean @tobiasKaminsky that this 5% limit should be already working in the dev version 20170502? Because it is not for me. I have more than 1GB of free space, which should give me about 50MB of cache size, but my cache howers around 12.2 MB erasing thumbnails randomly making viewing larger collections unusable in the app.

Wouldn't it be better to add the manual limit (that used to be in the beta) instead of this rule that potentially wipes the thumbnails when your available space drops (possibly due to a larger download). In my opinion, it would be much easier to debug and help people when they run into this issue (simply, did your thumbnails disappear? Check the cache the app is using and compare it to the limit set in the prefs), instead of some obscure, maybe the available space dropped for some reason and your thumbnails got erased..

Please note, I'm only trying to give a perspective for a possible scenario..

mario commented 7 years ago

I am unsure what the current status is, but eventually:

tobiasKaminsky commented 7 years ago

Neither master nor dev have any cache related settings at the moment as nobody developed it ;-)

AndyScherzinger commented 7 years ago

@tobiasKaminsky well, as you mentioned in the initial post there is #144 (currently closed) which added a setting to set a cache size which has been integrated in the beta before the rebuild of the beta. ;)

elpraga commented 7 years ago

Well, what I wanted to express was that working thumbnails are an essential part of a user experience when using the app. Especially when the app offers automatic upload or instant upload of the photos. The obvious use case of this feature is to store your photos on the Nextcloud server and have them at hand without having to have them all downloaded on the phone. Something that is impossible without the thumbnails working properly.

how the automatic cache purge will work is subject to discussion, but losing a thumbnail or two is definitely not an issue or a user experience problem that will hinder your ability to use the app

Try something in the neighborhood of 800 missing thumbnails in my case @mario , and yes, it does render the app unusable for viewing photos. So I do believe, that unless you want to send a message like Use our app, but don't use it too much, this issue needs to handled correctly in order to provide a pleasant user experience.

Unfortunately I cannot contribute with code, and don't feel entitled at all to tell you what you should do as I am not paying you for your work. I am merely trying to help you with bug reports.

And yes, I was talking about manual setting of the cache size @tobiasKaminsky because it existed in the beta app before. I don't understand why implementing this setting would be a suicide @mario (sincerely, I do not see the downsides, but maybe I am missing something).

P.S. I will add some screenshots to explain better @mario how pleasant is to use the app with current settings. screenshot_2017-05-03-15-46-34 screenshot_2017-05-03-15-46-47 screenshot_2017-05-03-15-47-23 screenshot_2017-05-03-15-47-34 screenshot_2017-05-03-21-04-12 screenshot_2017-05-03-21-04-23

And thank you for your work, I do appreciate it very much, and I am merely trying to help.

Tomas

mario commented 7 years ago

@elpraga I more than appreciate your reports and testing, and I will do my best to make sure the issue you're currently experiencing is fixed one way or another.

elpraga commented 7 years ago

Thank you @mario , I appreciate your response a lot. And I think it is not only about me and my case, everybody who starts using instant upload as a primary photo backup option (instead of giving all his/hers photos to Google) will sooner or later run into this problem. I might just happen to be the first one :smile:.

El 3 may. 2017 10:25 p. m., "Mario Đanić" notifications@github.com escribió:

@elpraga https://github.com/elpraga I more than appreciate your reports and testing, and I will do my best to make sure the issue you're currently experiencing is fixed one way or another.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nextcloud/android/issues/596#issuecomment-299024967, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLLKjkiMHHn4I77XnneLWw19kNWJt9Mks5r2OLAgaJpZM4LwlW4 .

OlivierS1 commented 7 years ago

Under the Beta version, there was the ability of scrolling through the pictures (scrolling through thumbnails) and if left long enough on the photo, it would be updated with the final image. This was really neat and handling the app was definitely more user friendly and efficient. It had the cache parameter updatable, but I couldn't figure out what was the benefit or the limitation of setting it at different values. I didn't notice any changes back then but didn't know what to expect either. To me, preview was much more powerful and seemed more fluid as well under Beta.

elpraga commented 7 years ago

You're describing the preview feature in the old beta @OlivierS1 , and it was indeed awesome :+1: . The good news is that according to @tobiasKaminsky this feature should be back soon (see https://github.com/nextcloud/android/issues/734#issuecomment-298886784)

elpraga commented 7 years ago

@mario , I have an outrageous question. Is there a real reason to set a limit to a cache size? If I understand it correctly, it doesn't effect people who don't need larger cache, and those who do need it will very likely enjoy having it larger (like me).

The reason is that there is one more issue I haven't mentioned earlier. When so many thumbnails are missing, the app constantly tries to download something, and because of this not even the pictures that are already on the device can be shown in the app (it just shows the rotating circle as it waits for the download of the thumbnails to finish.)

What I'm trying to say is, that if someone misses just one or two thumbnails (as was your example earlier), the increase of the cache size for that person would be unnoticeable, but if a substantial number of thumbnails has to be downloaded constantly, it restrains the use of the app greatly.

If you want to check it out, you can add some 1200 photos to your account and evaluate yourself the change in usability.

tobiasKaminsky commented 7 years ago

Until we have a better solution, I would like to change the cache size to at least 100Mb for the next release. As @elpraga said this should not affect people. Even on very low space devices cache can be cleaned very easy, so it is no real drawback. @mario @AndyScherzinger

(btw: glide is using 250Mb as default on internal storage)

AndyScherzinger commented 7 years ago

@tobiasKaminsky agreed 👍 Being a file / cloud storage app...a 100Mb cache size seems legit with the outlook tha we plan to move to a more dynamic caching size calculation anyways in a future release.

elpraga commented 7 years ago

Has the cache size been changed already in the dev app @tobiasKaminsky ? My application still hovers around 12 MB with many thumbnails missing..

tobiasKaminsky commented 7 years ago

@elpraga I have adjusted it to 200mb for now. It will be available the next days on fdroid.

elpraga commented 7 years ago

ok. That's great to hear! Will it be available via the usual method from within the app?

tobiasKaminsky commented 7 years ago

Yes :+1:

elpraga commented 7 years ago

Great! I can see all my thumbnails again! How I missed them!

Is this change going to get to the official client as well?

tobiasKaminsky commented 7 years ago

For the official client we want to intregrate a more intelligent cache sizing policy and not hardcode a value. But then the cache size will always be more than 10 Mb ;-)

elpraga commented 7 years ago

OK. but please, keep in mind

Please, at least consider and ponder upon my point of view, it is bases on my experience (I seem to be the only one with large enough picture collection to run into this problem already)

P.S. Ok, I just thought about a case when it could be useful. When someone has tonnes of pictures being created and shortly after deleted, and their cache would be full of old images. But that's really the only case I can think of.

tobiasKaminsky commented 4 years ago

I know it is outdated, but maybe we can research if an unlimited cache size is possible. (Android allows to clean cache, if device runs out of space, so we need not to limit it arbitrary)

elpraga commented 4 years ago

Unlimited cache size would be greatly appreciated by those who need to have many thumbnails readily available (people like me), and not even noticed by those who don't need it.

AndyXheli commented 4 years ago

@tobiasKaminsky any progress on this?