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

Photos missing caching feature #4235

Closed
pilsnerbeer opened this issue Jul 15, 2019 · 8 comments · Fixed by #2250
Closed

Photos missing caching feature #4235

pilsnerbeer opened this issue Jul 15, 2019 · 8 comments · Fixed by #2250

Comments

@pilsnerbeer
Copy link

Actual behaviour

  1. Photos (accessed from drawer) seem to be missing any sort of caching of thumbnail data. Each time when accessed, app will try to load all the photos from scratch. Since I have a good amount of photos on the cloud, it takes a lot of time.

Expected behaviour

  • Caching of the thumbnails is desired (probably cache as much data as possible, to prevent performance hiccups). Also, performance wise, I'd suggest that the app doesnt try to load all the photos at once, but perhaps just a few photos (50-60) and load more when user reaches the end of the list by scrolling. (Small enhancement plug - I view the photos as a very important segment of the app. Sorting and categorization by folders would be a great improvement.)

Steps to reproduce

  1. open Photos from the drawer
  2. after photos are loaded, go back to Files
  3. go back to Photos again, you will notice that all the photos load from 0

screen

Environment data

Android version: 9
Nextcloud app version: 3.7.0
Nextcloud server version: 15 snap

@tobiasKaminsky
Copy link
Member

There is now a PR ready to test:
#2250 (comment)

@pilsnerbeer
Copy link
Author

@tobiasKaminsky
OK quick feedback:

  • It takes about 1/3 of the time to load the photos now, which is sort of good (time wise it is still faster to view the photos in the bottom of the list with current slow method though - but its much faster if user wants to view most recent photos).

  • Sometimes, I experienced this known "No files" bug (which incorrectly replaces "Loading" screen)
    Screenshot_20190718-111641

  • This is the main problem of the update: a lot of pics will simply not load thumbnails, so what you're left with is this view. The current slow method loads all thumbnails without problems.
    Screenshot_20190718-112224

  • Sometimes the drawer bugs out and shows "Photos" as selected even when it's not.
    Screenshot_1

  • App crash-closed on me 2 times (related to the "photos" view) but I dont have the logs yet.

@tobiasKaminsky
Copy link
Member

Thank you very much for testing!

  • It takes about 1/3 of the time to load the photos now

This sounds a bit too slow. It should only load 60 items.
Is it faster when you open "photos" again, one time directly and one time waiting at least 30s (as I do caching)?

  • Sometimes, I experienced this known "No files" bug (which incorrectly replaces "Loading" screen)

This is known and an overall problem… :/

  • This is the main problem of the update: a lot of pics will simply not load thumbnails, so what you're left with is this view. The current slow method loads all thumbnails without problems.

Hm. I did not changed anything in regard of creating thumbnails.
Are those exact the same images? Are they generated faster when you browse within the app to the folder containing these images?

  • Sometimes the drawer bugs out and shows "Photos" as selected even when it's not.

Do you know when this happens? e.g. all files -> photos -> all files?

  • App crash-closed on me 2 times (related to the "photos" view) but I dont have the logs yet.

Logs would be indeed here very helpful.

Thanks again for your valuable feedback!

@pilsnerbeer
Copy link
Author

Is it faster when you open "photos" again, one time directly and one time waiting at least 30s (as I do caching)?

It takes the same time regardless if I let it sit to do the caching. About 6-9 seconds on average with the new version and 18-20 with the old one for me.

Do you know when this happens? e.g. all files -> photos -> all files?

Select photos from the drawer, then open the drawer and go back to "All Files". The "Photos" section will stay selected even if its no longer active. The app will crash if you select "Photos" from the drawer again. (All files>photos>all files>photos[crash])

Hm. I did not changed anything in regard of creating thumbnails.
Are those exact the same images? Are they generated faster when you browse within the app to the folder containing these images?

I found out they will eventually load one by one very slowly. Yes, thumbnails are generated faster from the "files" section than from the gallery (also the non-QA version is faster at loading the thumbs in the gallery, as mentioned earlier).

Another important issue I discovered was that some photos will refuse to fully load and instead are displayed by its thumbnail resolution, see below:
Only way to be able to load images from gallery properly is to go to "Files" section, find in which folder the picture is and let the app load the thumbnails. Once thumbnails are visible for that folder, it signalizes that the gallery will load the picture. In other words, user must visit the "files" section before heading to the gallery for it to load images properly.

pic
--

Another highly important issue is that the folders will display images that are in fact not in those folders (talking about Files section now, not Photos). Go to one of the folders where the pictures are and let it load. Then, manually update that file by swiping your finger down. The "No files bug" will emerge for a second and then random pictures that do not belong in the folder will appear in that folder. (This problem is not present in the non-QA version of the app).

@tobiasKaminsky
Copy link
Member

It takes the same time regardless if I let it sit to do the caching. About 6-9 seconds on average with the new version and 18-20 with the old one for me.

You start measuring when clicking "photos" in drawer, but what is the end? Having a list of images/thumbnails/placeholder?
If so, then I guess that 6-9s is the fastest we can currently get as the server needs also some time to generate search results.

@tobiasKaminsky
Copy link
Member

Select photos from the drawer, then open the drawer and go back to "All Files". The "Photos" section will stay selected even if its no longer active. The app will crash if you select "Photos" from the drawer again. (All files>photos>all files>photos[crash])

No crash for me, but indeed drawer menu is highlighted wrong.

@pilsnerbeer
Copy link
Author

You start measuring when clicking "photos" in drawer, but what is the end? Having a list of images/thumbnails/placeholder?

The end of the measure is when photos are loaded: In the public version that means all photos are loaded, in QA it means only the top few are loaded (I wasn't trying to scroll down to load more as part of the measure). This means that the current (public) version loads the photos at faster rate -> It does take longer time but all photos are loaded (and with thumbnails, as opposed to QA ver.) Therefore I assume there may be something wrong with the way QA loads the photos.

No crash for me, but indeed drawer menu is highlighted wrong.

It also stopped crashing for me, I don't know what was the culprit. I'll update if it starts crashing again.

@tobiasKaminsky
Copy link
Member

Can you give this a new try?
And then please respond in the other issue/PR.
#2250 (comment)

I'll close this now, to have all reports in one.

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

Successfully merging a pull request may close this issue.

3 participants