M4rtinK / modrana

ModRana is a flexible GPS navigation system for mobile devices. This is the main upstream modRana source code repository - waiting for your pull requests & patches! :)
www.modrana.org
GNU General Public License v3.0
66 stars 21 forks source link

Sailfish OS: Huge amount of map tile image files slows down MTP connection of the device #99

Open wanderer1988 opened 9 years ago

wanderer1988 commented 9 years ago

I recently investigated on my jolla that storing map tiles as files can cause troubles with the MTP connection. I reported this issue here: https://together.jolla.com/question/102084/huge-amount-of-image-files-ie-cached-map-tiles-slows-down-or-blocks-mtp-connection/. In my case I had over 83000 files in ~/.local/harbour-modrana/maps which had negative influence on the MTP connection.

Of course this is rather a bug of Sailfish OS than modrana, but it could make sense to store map tiles in SQLite databases instead of files by default until this issue is resolved by jolla. Also a possibility to delete map tiles in the app could be useful.

M4rtinK commented 9 years ago

This really looks like a quite bad OS-side issue.

As for switching to using Sqlite tile storage by default - modRana currently only supports loading tiles either from files or Sqlite, so if I changed this setting for existing installations it would mean that the already stored tiles would become unavailable to users while still occupying storage & causing the mentioned MPT issue. ModRana has also some support for using a platform-default (this is used for example from the beginning on Android for similar reasons - brain-dead image indexers) for tile storage, but that would only influence new installations and would not help current modRana users.

In short - I don't see any simple short term modRana-side solution fixing this issue for both current and future modRana users. On the other hand fixing this gross platform-level issue will fix it for all users of modRana and other mapping and image handling apps.

M4rtinK commented 9 years ago

Not to end on just a negative note, I have some mid-term plans for improved tile handling in modRana unrelated to this issue: