photos
photos copied to clipboard
Photos 2.0 - Slow speeds, navigation, ordering issues
Describe the bug Upgrading to the latest beta version 15.0.3 introduced the new version of Photos.
Currently I'm running into three different issues when viewing the overall apps/photos/ view which shows all images on the system.
-
Performance on my system is very slow to load. I suspect this may be because the initial dav query requests 1000 items. I'm using a separate PostgreSQL instance which contains a LOT of images and can be quite slow. If possible, the previous version requested a smaller number of images (I think it was around 15) which then performed another paginated search for a further number as you scrolled down the page. It would be amazing to get this part back, or perhaps customisable?
-
Ordering of images has changed, but I'm not entirely sure the exact ordering. Previously the view would display items in the most recently modified/recently added.
The DAV query seems to be working correctly. For example, the first items are:
<d:response>
<d:href>/<redacted>/01_TD_1.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>14270471</oc:fileid>
<d:getlastmodified>Sat, 27 Aug 2022 13:40:59 GMT</d:getlastmodified>
<d:getetag>"c71bd8b70533133097c425313a719546"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
<d:getcontentlength>2110878</d:getcontentlength>
<nc:has-preview>true</nc:has-preview>
<nc:file-metadata-size>{"width":1365,"height":2048}</nc:file-metadata-size>
<oc:favorite>0</oc:favorite>
<d:resourcetype/>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<nc:realpath/>
<nc:face-detections/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/<redacted>//<redacted>/.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>14270419</oc:fileid>
<d:getlastmodified>Sat, 27 Aug 2022 13:40:46 GMT</d:getlastmodified>
<d:getetag>"76a3ca3a325df858b4cfacd6944b266d"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
<d:getcontentlength>1762165</d:getcontentlength>
<nc:has-preview>true</nc:has-preview>
<nc:file-metadata-size>{"width":1306,"height":1935}</nc:file-metadata-size>
<oc:favorite>0</oc:favorite>
<d:resourcetype/>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<nc:realpath/>
<nc:face-detections/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
However, in the photos view, we're getting these files first. Suggesting perhaps it's ordering the wrong way around maybe?
<d:response>
<d:href>/<redacted>/Red_x5000-450x634.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>14245079</oc:fileid>
<d:getlastmodified>Fri, 26 Aug 2022 10:20:43 GMT</d:getlastmodified>
<d:getetag>"51ace037a58e2be631948ce5fb76e319"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
<d:getcontentlength>149554</d:getcontentlength>
<nc:has-preview>true</nc:has-preview>
<nc:file-metadata-size>{"width":450,"height":634}</nc:file-metadata-size>
<oc:favorite>0</oc:favorite>
<d:resourcetype/>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<nc:realpath/>
<nc:face-detections/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/<redacted>/Red_x5000-501x705.jpg</d:href>
<d:propstat>
<d:prop>
<oc:fileid>14245080</oc:fileid>
<d:getlastmodified>Fri, 26 Aug 2022 10:20:42 GMT</d:getlastmodified>
<d:getetag>"e3c1239146083d387ac22dd32cec6919"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
<d:getcontentlength>177274</d:getcontentlength>
<nc:has-preview>true</nc:has-preview>
<nc:file-metadata-size>{"width":501,"height":705}</nc:file-metadata-size>
<oc:favorite>0</oc:favorite>
<d:resourcetype/>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<nc:realpath/>
<nc:face-detections/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
- I suspect this final issue will be difficult to replicate and could be due to the speed issues previously and it would be great to get some further users testing this. If you scroll down the Photos page, say after 50/100 images and view an image, if you click off the image (so outside the image on the right or left), sometimes this reverts to the top of the page. It's intermittent for me but does seem to happen after I've done this a few times.
It's a bit difficult to send screenshots I'm afraid as it's a lot of family pictures currently at the top. For the moment I've reverted to the previous beta release due to the performance.
What method did you use to install the 2.0 version?
This was included in the latest beta of version 15 according to the release notes: https://github.com/nextcloud/server/pull/33674
I noticed a fairly significant change to the UI, though I think the version number may have appeared as the same in the apps view. May just be because it's beta.
So you also running the nextcloud server beta?
Yes, beta 2 currently.
cc @artonge
N°1 addressed in https://github.com/nextcloud/photos/pull/1209
3 can be ignored, I think this was an issue with the theme I was using.
Updated to the latest beta 6 and the performance does seem to be much better.
So just the ordering of images now!
Any updates on the ordering issues @artonge? Just aware that it was touted as a big feature upgrade and it's a bit unusable when you have a good number of images.
Any updates on the ordering issues @artonge? Just aware that it was touted as a big feature upgrade and it's a bit unusable when you have a good number of images.
In the forum, I pointed @andyxheli to a possible starting point to investigate the issue.
Here it is again:
I can't find
sortFilesByTimestamp
anymore. Either it does not exist, and the .sort is not using it. Or it exists but the logic is wrong. https://github.com/nextcloud/photos/blob/c8bf3a52d6affb175b17ed3380a6f39746e1c28a/src/mixins/FilesByMonthMixin.js#L40
@valdearg Any chances you could open a PR for that ?
Hrm, does this help at all? I'm afraid I'm not an expert:
https://github.com/nextcloud/photos/blob/05d89c6c783dfb804e8d1aa379430ad4eb5d36ee/src/components/FilesPicker.vue#L166
It looks like that used to be included in the FilesPicker.vue, but no longer.
https://github.com/nextcloud/photos/pull/1330 maybe, good luck.
sorry @artonge bit a little busy. didnt mean to ignore you.
@valdearg did you try to manually apply this patch ? did it help ?
@valdearg did you try to manually apply this patch ? did it help ?
Have to confess, I've never setup a NextCloud development process, I get an error about versions of Photos so probably need to do something else: "The files of the app Photos (photos) were not replaced correctly. Make sure it is a version compatible with the server."
Main website is on beta2 so doubt it's a drop in replacement!
If anyone is able to test it, that'd be great!
I can test. Can you give me a scenario to try before and after the test please
"The files of the app Photos (photos) were not replaced correctly. Make sure it is a version compatible with the server."
Both 'photos' and 'server' needs to be on the same branch, either master or stable25, else you will have this king of error :)
I can test. Can you give me a scenario to try before and after the test please
Thanks! Simple test is that the images should be in the order they were added to the system, so if you add a new image to a folder NOW, it should show at the top. All images should then be in the order they were added.
@artonge Hmm so question i though i can just modify the file but i cant so do i have to bulid a test app and then install it on the server ? if so, how do i go about doing that ? unless @valdearg you already have the app complied and ready for install ?
If you want to test on a live server, you could compile on your dev machine and move the build files to the server. You could also install the build tools on the server and compile on it directly, but that might be difficult or unwanted.
I only have a test server my windows machine only run github desktop or on my linux "ubuntu' then i have my test VM running Nc 25 RC3
Haha, I have a broken app so far I'm afraid! It just redirects to the Files currently.
Haha oh boy. I'm working on creating a dev setup
@valdearg @andyxheli if you have docker installed locally, you can check the PR out and test it easily with:
docker run -it \
--name nextcloud-easy-test \
-p 127.0.0.1:8443:443 \
-e PHOTOS_BRANCH=valdearg:patch-2 \
--volume="nextcloud_easy_test_npm_cache_volume:/var/www/.npm" \
ghcr.io/szaimen/nextcloud-easy-test:latest
@szaimen Thank you! I'll give that a try :)
I get an error as soon as i click on photos app see admin @valdearg how about you ?
Ah, that is probably my fault because the viewer app is missing.
Please try this one:
docker run -it \
--name nextcloud-easy-test \
-p 127.0.0.1:8443:443 \
-e PHOTOS_BRANCH=valdearg:patch-2 \
-e VIEWER_BRANCH=master \
--volume="nextcloud_easy_test_npm_cache_volume:/var/www/.npm" \
ghcr.io/szaimen/nextcloud-easy-test:latest
No worries. Trying it again, Thank you!
Looks good to me :)
OK, from my testing, thanks to the fantastic help from @szaimen there, I can also confirm it seems to be working too.
Just testing some other oddities as well.
OK, think that's all set! That patch seems to resolve it, thanks for everyone's help with this!
Not sure the procedure for fully approving the fix and including it in where it needs to be fully, but it should be good.