-
Notifications
You must be signed in to change notification settings - Fork 15
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
On/off switch for individual downloaded offline maps to increase responsiveness? #273
Comments
Wow 11 countries, I never tried that :-) The code is written the way that it should not affect performance so much. Searching is using "local" database first to provide nearest results fast as possible and routing is looking outside of the local map just when needed... But of course, there is overhead. All the indexes will not fit to phone memory and caches are under higher pressure... Enabling / disabling map in MapManager should be easy. But I don't like it :-D First, I will try to measure performance impact and possible bottlenecks. Info page for downloaded database is good idea. I will add it. |
Hey! Thank you for your quick reply and for looking into this. 11 countries is a lot, I agree, and some of them are quite heavy. I have: canary islands, belgium, denmark, finland, france, germany, norway, portugal, spain, sweden and greenland downloaded. Though I suspect it may only take a few of them to mess things up good. I do not blame you for not loving the disable idea. Perhaps if we used another word for it... "sleep" perhaps :-D. But I respect your position. It may be an efficient hack. But it is a dirty og boring "administrative" hack with zero academic challenge and elegance. What ever you decide, at least I tried. And if your investigation reveals some bottlenecks that can be eliminated, it may even benefit some less heavy users. But don't let it disrupt your engagement in more interesting or urgent matters. |
I actually created an (admittedly) crude shell script to handle the task. Adjust paths to fit your setup and use at your peril. It creates a hidden .Maps directory at the same level as the original Maps directory. The script enumerates the maps in the Maps folder and the hidden maps in the .Maps folder and gives you the option to flip the active map into inactive (and vice versa) by entering the number next to it. The script will pkill the osmscout process before making changes. When you exit the script, it will reastart osmscout for you. Beware that having maps inactive and having osmscout downloading a new map of the same area can and will have unpredictable or even interesting results when you use the script to flip the two copies/versions of the same map active and inactive. osmoffon7.sh #/bin/sh function enumflip() #enumerate if $2="", otherwise flip the offline map #i active or inactive cd ~/sdxc = output from a sample run = [defaultuser@void2 ~]$ sh bin/osmoffon7.sh |
I have 11 individual offline maps downloaded to the memory card in my phone taking up about 11.5 GB.
Sadly this often slows down the interface to a halt, e.g. searching and routing.
I am working around this by temporarily moving the directories for the individual maps that are not needed a given moment out of the "Maps" directory structure to elsewhere on the memory card, thus hiding it from the mapping engine.
Though not exactly optimal, it appears to work fine, though you need to close OSM Scout while you "hide/disable/enable" a downloaded map.
Would it be (relatively) easy to implement an extra menu option (e.g. by touching and holding a downloaded map) on the Downloaded Maps page to make it possible to hide or disable/enable the use of the map, thus giving the engine less nodes to worry about?
Some may consider this as "dirty" method from a data scientific perspective, as it would of course be preferable to have a mapping engine that can handle all maps at all times and automatically only focusing on the data needed at the local location.
But I think the dirty method is justified as an easy win in this case. And it will probably not require too much rocket science.
A simple method (I guess) to show if a map is active/inactive in the menu without having to reorganise the Downloaded Maps page too much, could be "graying out" the inactive maps.
And while being there, it would be nice to have yet another menu option, "properties/info" to show version and size of a downloaded map, like the information you see when a downloaded map has a newer version available for download (Size, Downloaded, Last update, Data Version).
Thank you for your time.
The text was updated successfully, but these errors were encountered: