Bug 263010 - [Patch] Marble does not use the shared tile cache on N900
Summary: [Patch] Marble does not use the shared tile cache on N900
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Maemo 5 Linux
: NOR wishlist (vote)
Target Milestone: 1.1.0
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-13 11:08 UTC by Enrico Zini
Modified: 2011-05-04 19:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enrico Zini 2011-01-13 11:08:22 UTC
Version:           unspecified
OS:                Linux

On the N900, ~/MyDocs/.maps is a container for a shared tile cache. It is a fantastic thing, because it avoids having to fill the SD card with one copy of the tile cache for every application that displays a map, and to having to keep them all separately up to date.

This is used successfully, for example, by mappero, evopedia, map buddy, modrana.

Marble instead uses ~/MyDocs/.local/share/marble/maps/earth/ and I couldn't find any way to change that. The SD is formatted with a FAT-like file system that doesn't support symlinks, so I cannot fix it by just symlinking the openstreetmap directory in there to "~/MyDocs/.maps/OpenStreetMap I".

This is especially frustrating as the disk layout for the tile cache seems to be exactly the same. It looks like a small change that would give enormous gains.

Reproducible: Always
Comment 1 Dennis Nienhüser 2011-01-13 23:40:11 UTC
Symlinks do indeed not work due to the fat limitation. I haven't tried it yet, but switching to ext3/4 as the filesystem may be a workaround (with additional benefits).

I plan to change the openstreetmap map theme to use that directory for cached tiles in the future. Currently we're lacking support for absolute cache directories however (the cache directories are assumed to be relative to Marble's data directory).

Patches are welcome of course. There's not too much code to change, just tracking down where the assumption is made that the path is relative and extending it to handle absolute ones. Afterwards we just need a small patch for openstreetmap.dgml in the Maemo packages to have it work.
Comment 2 Enrico Zini 2011-01-14 08:56:01 UTC
Dennis, that is the partition that is exported as USB mass storage when connecting the phone to a PC via a USB cable.

Yes, reformatting it as ext4 would allow symlinks and it may be a workaround, but that it gives "additional benefits" is, to be polite, a rather debatable statement.
Comment 3 Dennis Nienhüser 2011-01-14 09:44:54 UTC
(In reply to comment #2)
> Dennis, that is the partition that is exported as USB mass storage when
> connecting the phone to a PC via a USB cable.

Yes. Windows systems would probably not be able to mount it via USB when formatted as ext3. Wouldn't be a problem for me.
 
> Yes, reformatting it as ext4 would allow symlinks and it may be a workaround,
> but that it gives "additional benefits" is, to be polite, a rather debatable
> statement.

I was referring to vfat on the N900 using a large cluster size, wasting space when storing many small files. This is exactly the use case of all tile sharing applications. Ext3/4 in contrast store these files much more efficiently.
Comment 4 Dennis Nienhüser 2011-01-15 13:52:39 UTC
Patch (Marble part, packaging tbd.) is at http://reviewboard.kde.org/r/6334/
Comment 5 Dennis Nienhüser 2011-01-27 21:20:36 UTC
SVN commit 1217541 by nienhueser:

Allow using absolute source directories in texture layers in .dgml files.
Extend .dgml by a tileSize tag (width and height attribute), usable inside textureLayer tags. Such .dgml files are backwards compatible.
Handle 'base tile missing' case more gracefully and return an empty image instead of triggering an assertion.
Move the default tile size (675) to global.h and replace hardcoded default tile sizes with it.
CCBUG: 249633
CCBUG: 263010
REVIEW: 6334

 M  +1 -0      data/maps/earth/bluemarble/bluemarble.dgml  
 M  +2 -0      data/maps/earth/openstreetmap/openstreetmap.dgml  
 M  +2 -1      src/lib/FileStoragePolicy.cpp  
 M  +2 -2      src/lib/ImageLoadThread.cpp  
 M  +1 -1      src/lib/MapWizard.cpp  
 M  +32 -36    src/lib/TileCreator.cpp  
 M  +18 -4     src/lib/TileLoader.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.h  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.h  
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.cpp   [License: LGPL]
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.h   [License: LGPL]
 M  +27 -5     src/lib/geodata/scene/GeoSceneTexture.cpp  
 M  +1 -0      src/lib/geodata/scene/GeoSceneTexture.h  
 M  +3 -0      src/lib/global.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217541
Comment 6 Dennis Nienhüser 2011-03-28 23:59:03 UTC
SVN commit 1226352 by nienhueser:

Allow using absolute source directories in texture layers in .dgml files.
Extend .dgml by a tileSize tag (width and height attribute), usable inside textureLayer tags. Such .dgml files are backwards compatible.
Handle 'base tile missing' case more gracefully and return an empty image instead of triggering an assertion.
Move the default tile size (675) to global.h and replace hardcoded default tile sizes with it.
CCBUG: 249633
CCBUG: 263010
REVIEW: 6334
Backport of commit 1217541.

 M  +1 -0      data/maps/earth/bluemarble/bluemarble.dgml  
 M  +1 -0      data/maps/earth/openstreetmap/openstreetmap.dgml  
 M  +2 -1      src/lib/FileStoragePolicy.cpp  
 M  +2 -2      src/lib/ImageLoadThread.cpp  
 M  +32 -36    src/lib/TileCreator.cpp  
 M  +18 -4     src/lib/TileLoader.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.h  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.h  
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.cpp   [License: LGPL]
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.h   [License: LGPL]
 M  +27 -5     src/lib/geodata/scene/GeoSceneTexture.cpp  
 M  +1 -0      src/lib/geodata/scene/GeoSceneTexture.h  
 M  +3 -0      src/lib/global.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226352
Comment 7 Dennis Nienhüser 2011-05-04 19:09:24 UTC
Fixed in the last release, soon in extras.