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
Non localized pictures devices #46
Non localized pictures devices #46
Conversation
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
For the lazy loading ICache is used. There is the issue that the cached entry is not deleted nextcloud/server#15208. @eneiluj Should we programm a workaround and safe the timestamp manually in the cache and programm a deletion, or should we wait unit the issue is fixed on the server side? |
Yay, seems nice! It would be great if you could explain what you did in a few lines. A list of things you did technically, why you did it and what effect/benefit it has.
I don't know since I didn't really get what the issue is. Even if the cache is not deleted, it probably does not generate a huge amount of information. I think we can implement Maps like if caching was working as expected. What do you mean by "save the timestamp manually"? Do you mean without caching? A first remark: My point of view about getting a lot of elements with ajax requests is: by experience it's much faster and efficient (client CPU load) to get them all in one request if you want them all anyway. It's faster because making a HTTP request costs extra time which is probably bigger than the time needed to process the result. So if you repeat it hundreds of times, the time proportion taken by HTTP requests is huge. It's more efficient because you can factorize the processing of results. I'm sorry if I say potentially obvious things or if I didn't exactly get the reasons of your choices 😄. I just want to be clear and explicit 🤓. Ow and a very small remark: You fixed |
Talking more messurements shows me that I was overshooting the goal.
I will fix that |
Ok I think I got it now. Neat! Without explanation and without reading the code in detail it was hard for me to understand. So from what I understand: Now, when Photos layer is enabled, js controller first gets the ids of all non-localized photos and then does one request per photo to ask server side controller to guess the coordinates and provide the photo entry. Each successful guess is cached on the server side. This PR is not about pre-guessing with a cron-job or files/contacts/anything hooks. Am I right? So I agree with you about making multiple requests because the guessing is done at this moment. I thought you were just getting already guessed things from the DB.
Is it really done on page load or just when Photos layer is getting enabled? We need to be very explicit and descriptive when discussing those kind of features otherwise I say stupid things. 😄 |
Btw,
Does it mean there is no bug in NC caching system? |
Yes the ttl is just the minimum time to life you should not expected it to be deleted after it |
The main Idea was not to wait for 10000 pictures that the location is computed, but to load them incrementally. I think loading every picture was too much, so I will change it to load batches of 20 pictures or something. |
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
Now it is doing what it is supposed to do. Reducing the loading time of pictures without geoinformation. |
I will close this |
Addressing toDo in #45