I had a look a the _Maps_ app, thought "looks interesting, I'll explore this later today". Jumped on the tractor to get a snow blade, came back and noticed the _News_ app had stopped updating (again). OK, so I need to clear out a stuck job from the oc_jobs table again, here goes...
...only to find out it wasn't _News_ which got stuck - it was fine - but _Maps_ which was busily adding photo scan jobs. Lots of jobs... I disabled the app and killed the active scan jobs, removed about 400K entries from _oc_jobs_ and all was fine again.
While I understand that those who enable GPS tagging on their cameras and phones like to use this feature to locate their photos on a map it should be clear that those of us who always _disable_ GPS tagging don't stand to gain anything from this feature and as such would rather have it disabled, especially given the enormous load these scans put on the system. I had a look through the app settings but found no _Maps_ entries, nor does the _Settings_ option in the app itself allow one to disable photo scanning.
May I suggest the addition of such an option? It would make _Maps_ usable where it currently isn't - yet I could have it finish the scan but that would take days if not weeks for no purpose whatsoever given the absence of GPS tags in the photos on this system. I jury-rigged the app to disable photo scanning for now so I can use _Maps_, if there is interest I can submit a PR for the requested features (i.e. global and/or per-user photo scan enable/disable)
An option to disable the bg scan sounds like a good solution.
Or we can disable the automatic initialization scan.
@eneiluj @jancborchardt what do you think would be more appealing?
Sounds like a per-user setting in the bottom left settings section of the app. Enabled by default to keep the current functionality but it can be quickly disabled:
- [x] Automatically scan location data of photos
What do you think? @Yetangitu are you up for implementing that?
I think it should be a administrator setting. Instances which use ajax cron get problems with the high amount of bg jobs created. So the option to disable picture scanning is mostly a performance consideration, and should therefore be an admin decission, as otherwise as single user could influence the experience of all other users of the system.
Sounds ok as well. 2 questions then:
I think I would combine the default option to the used Cron system. Ajax Cron default disabled other Cron default enabled.
I would remove the navigation entry if the scam is disabled. Users of instances where the scan is disabled will never worry about not seeing photos as the menu entry is not there.
What do you think?
Sure, that sounds good. Only one thing about completely hiding the navigation entry: We should have some sort of notice as to why these entries are not there, like e.g. in the settings:
To see photos and contacts on the map, automatic scanning needs to be enabled in the admin settings.
Or something like that? Because otherwise, you see photos and such in the app description and then wonder why it鈥檚 not there.
I just tried the Maps app again only to notice the scan is still performed, and promptly disabled it by having PhotofilesService->rescan() return immediately. While this works for me - none of us here enables GPS tagging on our devices since that is more or less sure to leak privacy-sensitive data to third parties - it is no real solution. From reading the replies to my earlier report the consensus seems to be to:
As for disabling the navigation entry when automatic scanning is disabled I'd suggest to keep the navigation entry as it is with a note that it is likely that not all photos are displayed before a manual scan has been executed. Photos which were imported after the app was enabled will have their location scanned, it is the automatic initial scan of all photos which causes performance problems. Scanning tags on photo import does not add an undue burden as far as I can see.
Will you accept a PR with these changes?
Most helpful comment
Sure, that sounds good. Only one thing about completely hiding the navigation entry: We should have some sort of notice as to why these entries are not there, like e.g. in the settings:
Or something like that? Because otherwise, you see photos and such in the app description and then wonder why it鈥檚 not there.