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

Photo section load endless #1682

Closed
CordlessWool opened this issue Oct 17, 2017 · 23 comments · Fixed by #2250
Closed

Photo section load endless #1682

CordlessWool opened this issue Oct 17, 2017 · 23 comments · Fixed by #2250

Comments

@CordlessWool
Copy link

CordlessWool commented Oct 17, 2017

Actual behaviour

photo section is loading endless. Monitoring Server show that the cpu use increase for an minute but the the app do not stop loading. thumbnails in "all files"-section are shown normal

Expected behaviour

should show photos after created thumbnails on server

Steps to reproduce

  1. open app
  2. click to photo seciton

Environment data

Android version: 7.1.2

Device model: Nexus 5x with LineageOS

Stock or customized system: LineageOS

Nextcloud app version: 2.0.0

Nextcloud server version: 12.0.3

Logs

Web server error log

no specific error on server log, only Sabre\DAV\Exception\BadRequest: expected filesize 1343225856 got 57344 at same day but not same time

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

@CordlessWool CordlessWool changed the title Photos loads endless Photo section load endless Oct 17, 2017
@phatair
Copy link

phatair commented Oct 17, 2017

Same problem here.
Galaxy s7 edge with android 7.0
Nextcloud app 2.0.0
Nextcloud server 12.0.3

Photo section and the search is loading endless.
I didn't checked the server logs. I will do this tomorrow.

@AndyScherzinger
Copy link
Member

The photo search might take quite a while at this time since it fetches a search result with all images-search-items from the server and then renders a result list this might, depending on the image count take ~15 minutes for 5000+ images (like on my server).
This will get better as soon as:

  • the app moves to recycler view for lists
  • fetches the result in blocks while it still be just as fast as the server does the search...

@memen45
Copy link

memen45 commented Oct 18, 2017

Same here. Isn't it possible to limit search to specific directories? For example 'Photos' or 'Pictures' would be directories you want to load, but 'Backup/Photos' probably not.

@phatair
Copy link

phatair commented Oct 19, 2017

I dont have a lot of pictures on my cloud - around 300 and I don't see any pictures in the photo section - Only "loading..."

@CordlessWool
Copy link
Author

I do not know how much pictures I have exactly but I open the app and let it work for a while (much more then 15 minutes). Is it a problem if screen goes black, I am not 100% familiar with android? But also the cpu usage on server goes back to normal after around 1 minute

@AndyScherzinger
Copy link
Member

@CordlessWool yeah, most of the processing takes place on the client due to a not yet optimal implementation (ListView instead of RecyclerView, reading all data at the same time instad on endless scrolling/block-reading).

@phatair
Copy link

phatair commented Nov 2, 2017

I don't get this running in my phone.
is there any release date for a fix?

@influenist
Copy link

I sort all pictures based on year / month. With around 300 GB of pictures and 500 a month. The app is sooooo slow a honey. Even the web is loads bad with the Preview app enabled. Basically it doesn't fix anything. Compared to Dropbox, this solution is very FAR behind...

I run NC on 6 core with super fast SSDs, 4 GB ram and all optimisations which you can imagine like NGINX, APU, Redis.

@KeesKemper
Copy link

I've put in all directories .nomedia to prevent that the pictures are displayed. Even then the phone keeps saying loading when the photo's option is selected. Is there any sight on a fix?

@tobiasKaminsky
Copy link
Member

There are several things which will improve speed: #2087, nextcloud/server#8023 and we want to show only the first 100 (to be discussed) images and when reaching the bottom of the list, it should automatically append the next 100.

@rullzer
Copy link
Member

rullzer commented Feb 3, 2018

As pointed out by @tobiasKaminsky we are working on improving this. The big issue is that server side support is needed. And nextcloud/server#8023 is a big step in that direction. This will allow the client to do better queries resulting in faster and smaller responses.

Currently the only thing the client can do is say: "Give me all the pictures!" which on most setups will take a significant amount of time to fetch/process and return.

So long story short we are working on this and hopefully it will all run as smooth as possible on NC14

@phatair
Copy link

phatair commented Feb 16, 2018

Ok, i hope that will be fixed in NC14 :)
I'm running now NC13 and the newest android app and its still the same problem.

@suokunlong
Copy link

Is this the same issue as in issue #2850?

@elpedriyo
Copy link

No fix yet on displaying photos quicker on the android app?

@Mirkbot
Copy link

Mirkbot commented Nov 20, 2018

Every modern photo collection has too many pictures for the android app to work properly.
The issue definitely needs resolving.
I wonder why the issue was removed from the milestone.

@AndyScherzinger
Copy link
Member

The server doesn't support reading the photos in blocks, thus this can't be implemented at the moment.

@mlaverdiere
Copy link

mlaverdiere commented Dec 8, 2018

One relatively light workaround I see at the development level could be that, when the user selects the photo/gallery section in the Android app, instead of trying to show all the pictures available in all the folders (which never succeeds with medium/large collection), it could behave like the NC web gallery app, i.e. only showing the first level folders where pictures are available. Then, navigating in each of these folders, where presumably there is less pictures to show, could give a chance to the app. to actually show something!

This is not the perfect solution of course but it could make the photo section in the Android app usable (right now, it's pretty useless with medium/large collections).

That said, the ultimate goal should still be to be able to show all the pictures in the photo section, with a reasonable delay, like Dropbox and other comparable apps do.

@s6410
Copy link

s6410 commented Apr 8, 2019

It works fine on iPhone, where all photos are listed as expected, but doesn't work on Samsung S8, where I only get the spinning wheel.

Nextcloud server: 15.0.5
Nextcloud client: 3.5.1
Phone: Samsung S8 Android 9

@rhatguy
Copy link

rhatguy commented Jun 17, 2019

Whats the latest on this issue? I've been avoiding moving my large photo collection into Nextcloud as the android app is completely unusable with a large collection. Are changes still being worked on on the server side to speed up the android client loading images?

@s6410
Copy link

s6410 commented Jun 17, 2019

Still behaving the same on my Samsung S8. My server is the latest version as well as the app. No change:(

@tobiasKaminsky
Copy link
Member

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

@tobiasKaminsky
Copy link
Member

To centralize this please report anything found in #2250.

@KlavsKlavsen
Copy link

I just installed nextcloud (running as docker instance - with haproxy in front) - and it "seems to work fine". I connected the fdroid app on my lineageOS 15.1 to it - and I uploaded the 4 images I have (only 4). They now shop under InstantlyUPloaded/Camera - and show in webbrowser as well.
When I select "photos" - it shows the 4 images - but even though everything seems to work - the wheel keeps spinning in the app - below the pictures.. This can't be it waiting for some request and never timing out?

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.