Skip to content

Index: Skip updates if there are no changes #3227

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

Closed
lastzero opened this issue Feb 22, 2023 · 16 comments
Closed

Index: Skip updates if there are no changes #3227

lastzero opened this issue Feb 22, 2023 · 16 comments
Assignees
Labels
enhancement Enhancement or improvement of an existing feature performance Performance Optimization released Available in the stable release ux Impacts User Experience

Comments

@lastzero
Copy link
Member

As a user who frequently indexes his library to detect potential changes, I don't want to completely refresh the index every time so that indexing is faster and consumes fewer server resources.

@lastzero lastzero added ux Impacts User Experience performance Performance Optimization enhancement Enhancement or improvement of an existing feature labels Feb 22, 2023
@lastzero lastzero self-assigned this Feb 22, 2023
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero lastzero changed the title Index: Skip updating counts and album covers if there are no changes Index: Skip updates if there are no changes Feb 23, 2023
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
lastzero added a commit that referenced this issue Feb 23, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member Author

With today's changes, indexing time has dropped to almost zero if there are no changes in the file system.

indexing-time

@ant0nwax
Copy link

ant0nwax commented Apr 8, 2023

HI @lastzero i am curious if this would help me too, I upload with PhotSync via WebDav from my mobile and the re-indexing takes always 10-15 minutes with 90000 photos... could you please share the secret how you made it possible to "indexing time has dropped to almost zero" would this change or release help me if i would like to have only photos from the last time indexing was done indexed? my goal is to have a webdav upload of lets say 1 to 300 new photos, and then the indexing should only index those, when i use webdav of course... or shall i do a feature request for my idea?

seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
Signed-off-by: Michael Mayer <michael@photoprism.app>
seeschloss pushed a commit to seeschloss/photoprism that referenced this issue Apr 10, 2023
…3227

Signed-off-by: Michael Mayer <michael@photoprism.app>
@graciousgrey graciousgrey added the released Available in the stable release label May 3, 2023
@ant0nwax
Copy link

ant0nwax commented May 3, 2023

When will I be able to update my docker container to see if this works in my used case? I wrote some weeks ago and i did not get a reply?

@graciousgrey
Copy link
Member

We released a new version with these improvements yesterday. In general unless you have "complete rescan" selected on the index page the indexer only indexes newly added or edited files. Unchanged files won't be indexed in this case.

https://docs.photoprism.app/user-guide/library/originals/#when-should-complete-rescan-be-selected

@ant0nwax
Copy link

ant0nwax commented May 3, 2023

Thank you Theresa, cannot wait to update and test ;) sounds awesum!

@ant0nwax
Copy link

ant0nwax commented May 4, 2023

I Updated... My Opinion: After uploading from PhotoSync (Android) i needed to wait again 5 minutes until the photos appeared, in the old solution (GooglePhotos) this was seamless, the photos have been available for download in 1-2 seconds. What could be improved to make this more seamless in PhotoPrism?

@lastzero
Copy link
Member Author

lastzero commented May 4, 2023

You can reduce this safety delay if it is too long for you:

https://docs.photoprism.app/getting-started/config-options/#index-workers

@ant0nwax
Copy link

ant0nwax commented May 4, 2023

thank you @lastzero i wonder why 15 minutes is default, may I ask which number is used in your production installation (1-86400s) thank you

@lastzero
Copy link
Member Author

lastzero commented May 4, 2023

PHOTOPRISM_AUTO_INDEX is what you want to change, the default are 300 seconds, which is 5 minutes. It's a safe setting for users with slow uploads to avoid incomplete picture sets like when you upload stacks / images with sidecar files. Most users can reduce it.

@ant0nwax
Copy link

ant0nwax commented May 4, 2023

I think I could set 30 seconds for my user behaviour, I am the only user and admin. i dont use sidecar files they have been only visible when I once scanned the google and once scanned the flickr takeouts...
I also read I can set config on UI but I think this particular setting of PHOTOPRISM_AUTO_INDEX can only be set on CLI or what I will try in the YML file. I bet this will give me a very good user experience finally... Thank you for all your help

@ant0nwax
Copy link

i finally udpated again and added this 30 seconds, lets see how it works for the next weeks

@lastzero lastzero moved this to Released 🌈 in Roadmap 🚀✨ Jun 8, 2023
@lastzero
Copy link
Member Author

@ant0nwax We have added your question to our FAQ so others can find the answer there: https://docs.photoprism.app/getting-started/faq/#why-are-files-uploaded-via-webdav-not-indexedimported-immediately

@ant0nwax
Copy link

ant0nwax commented Jun 13, 2023

Thank you for improving your FAQ, I like documentation a lot :)

One thing to notice after some weeks of using the feature that i configured:

If I upload more than 200-250 new photos at once via the recommended solution (Android PhotoSync and WebDav), photoprism running in docker does not recognize the photos at all... instead the photos are uploaded but do not appear in the stream at all. I think maybe something breaks which i was not keen on debugging yet.

My workaround until now: reboot the photoprism docker VM, where only photoprism is running. After reboot the photos are visible in the stream and the rest like face recognition and labeling also works on the photos.

Is it maybe possible that the 30 second cron job could be skipped? That means if WebDav upload was existing in the last 5 seconds after the indexing is triggered then the indexing does NOT start and counts to 25 sec again?

I think I remember you mentioned something that multiple indexing during upload might cause trouble?
and actually can it not be prevented if indexing is already running to retrigger indexing? Why is the notification inside the Indexing of Library, it should by design not be possible imho to be able to retrigger such a complex process before it did not return :)

Do you have any idea where to start debugging effectively in this case (Mass upload of 200 WebDav photos)

@lastzero
Copy link
Member Author

You force a reindex every 30s in addition to using WebDAV with the auto index feature enabled? That sounds wild.

@ant0nwax
Copy link

I do not know about forcing something, i use the default settings only... in our discussion above you mentioned a conclusion, shall I share any config file docker compose eg that you understand how my setup is configure?

i guess the webdav upload triggers a re-indexing which i can avoid? how?
maybe the issue is webdav upload of 250 photos breaks at 170
indexing is triggered after upload breaks
i restart the missing 80 photos upload
indexing is re-triggered after upload

if my setup re-triggers indexing every 30 seconds it is because the time, after webdav upload, to see results in the photo stream was too long
I was spoiled from G***gle photos... and then i was spoiled with an Android App (maybe this one? https://github.com/thielepaul/photoprism-mobile) that worked in the beginning and was very efficient and good, until it broke.

I was told in this github community to use Android PhotoSync with WebDav as official solution and it works not as good as the old solutions mentioned above...

How could I get the best seamless experience, that means in the unsupported Android App really after the last upload the photos already appeared in the photo stream... Is there any know feature request to make this possible with another way of upload than webdav? i feel there could be a more native way what was maybe used by the unsupported android app, that is broken atm :)

@lastzero
Copy link
Member Author

We may be able to help if you use GitHub Discussions, so not every contributor gets an email on every comment 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement of an existing feature performance Performance Optimization released Available in the stable release ux Impacts User Experience
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants