Thread
:
Maemo Mapper v2.2 for OS2006/OS2007/OS2008
View Single Post
nutter
2008-01-21 , 15:45
Posts: 33 | Thanked: 16 times | Joined on Dec 2007
#
179
I am developing a new map file system for MM2.x right now, and want to plug it into MM2.2 to see any improvement.
I still like MM1.x file system, which is a lot faster. The draw back is the size of space map files take, since most modern SDHC card uses 32k as the default allocation unit, while the map tile file average size is around 6k, so 80% space is wasted. GDBM is not a very good solution I think. It's not scalable, it will slows down quite big with the tile number grows, on the other side the op file system just slows down a little, because most directory table or even fat table are cached.
My compromising solution for speed and space is to to still use MM1.x file structure, but each map file will hold up to 8 map tiles. The x directory name is (x>>2), y file name is (y>>1). In this way 8 map tiles in one file will be as m=(x>>2), n=(y>>1), so they are (m, n), (m+1, n), (m+2, n), (m+3, n), (m, n+1), (m+1, n+1), (m+2, n+1), (m+3, n+1), 8 tiles. Because of the nature of N8xx display resolution, one file reading can cover the whole screen. The speed may be even better than MM1.x.
As for the file size, my calculation shows that each tile wastes about 2k space in average, down from MM1.x's 26k, which is a significant improvement. Also a smart cache system can be implemented just using a few M bytes memory(MM2.3 uses 32M). The algorithm will be using the "distance" between the current displaying map tile and stored map tile, to decide which cache slot will be released if required. The cached map file with the biggest "distance" will be freed first, thus it only caches the around navigating area.
The only drawback of this file system is that you can't use the multi-thread downloading, I haven't figure out the way how multi-thread can do that, since you may hit the chance that different dn threads may try to modify/insert tiles into one map file.
That's my 2 cents of improvement idea, hope the developer can consider it and do some test. I am trying to develop a module based on that, but I have to say I have some trouble with the linux platform setup issue.
Last edited by nutter; 2008-01-21 at
16:01
.
Quote & Reply
|
nutter
View Public Profile
Send a private message to nutter
Find all posts by nutter