maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Maemo Mapper v2.2 for OS2006/OS2007/OS2008 (https://talk.maemo.org/showthread.php?t=12434)

gnuite 2008-01-16 03:02

Re: Can we get heading display on top
 
Quote:

Originally Posted by cool-n800 (Post 127781)
Hi,

First, many THANKS to all and GNUITE for such a great app.

I see that "heading" is displayed only when we open GPS info in left side.. but it hides some portion of map. I dont want to see GPS info all the time but HEADING info is very nice.

Can we see / display transparent dial for heading information ? May be on the top right / left corner.

Heading is also indicated by the blue line coming out of the dot that indicates your location. If it's not big enough for your tastes, considering increasing the Draw Width in the Settings dialog.

gnuite 2008-01-16 03:04

Re: How does auto rotate work in maemo mapper
 
Quote:

Originally Posted by cool-n800 (Post 127784)
When I drive with N800 + Mapper + GPS, I want to see a map moving towards my the direction in which I am going. i.e. the blue dot should always move upwards.

Is it possible ?

I have tried auto center options -- lead and lat/lon but it just keeps the dot in center. The map moves anywhere but not upwards (or downwards, I should say).

Any clue ?

Enable "Auto-Rotate" by either pressing the down button on the D-pad (in the default configuration) or by using the "View | Rotate | Auto-Rotate" menu item.

james.bottomtooth 2008-01-16 03:13

Re: Can we get heading display on top
 
Quote:

Originally Posted by gnuite (Post 128475)
Heading is also indicated by the blue line coming out of the dot that indicates your location. If it's not big enough for your tastes, considering increasing the Draw Width in the Settings dialog.

also when Tracking is turned on it gives you an idea where you have been and where you are heading. which i love :D

iKneaDough 2008-01-16 03:15

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
Is there some way to defrag or optimize the maps .db files? MM2 used to work very quickly when I first started using it, but now I downloaded many maps and the .db file is 900mb and displaying of maps is much slower now, especially when changing zoom levels.

gnuite 2008-01-16 03:17

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
Quote:

Originally Posted by nutter (Post 128195)
MM2 uses gdbm database to save the card space and make the interface simple, the drawback is that gdbm is not that efficient. Every time you fetch a key or data, it allocates memory twice - read from the file and make a copy then give it to you, user has to free the memory - this approach is not necessary in this application. I delete that in my windows gdbm library, since MS runtime simply refuses to free the memory and crashes. Redundant memory allocation of gdbm is a slow factor.

In my testing, GDBM was clearly slower than using the file system directly (as it was done in versions prior to v2.0). But file system overhead inflated disk requirements by (in some cases) up to an order of magnitude. It's a tradeoff that MANY people asked for.

I also tested sqlite3 as an alternative. Although slower than using the file system directory hierarchy, GDBM was much faster (and a little bit smaller) than sqlite3.

Quote:

Originally Posted by nutter (Post 128195)
Hash value calculation is quite consuming in gdbm, which depends on the key length. The MM2 uses 12 byte key, it seems too long, there is no difficult to condense it to 8 byte length, it can save some time.

At best, I could make it 9 bytes, but that doesn't line the memory up very well, and ARM is much more efficient with 32-bit ints that are aligned along 32-bit boundaries. Besides, hash values are calculated at most once per map access (or maybe 12 times per screen draw). That's not a lot of CPU utilization.

Quote:

Originally Posted by nutter (Post 128195)
The most important, there is basically no cache management in gdbm, every time you fetch a key or data, it goes into reading file. It really slow you down. So implementing cache management is definitely a good way to smooth things up.

This was implemented in Maemo Mapper v2.3. Give it a try, and see if it satisfies your speed requirements.

Quote:

Originally Posted by nutter (Post 128195)
From my point of view, it may be improved if we have a SW architecture like

GUI <--> cache management <--> downloading/file read/save

That's actually quite close to how it's implemented, except that the thread division is as such:
1. One thread for the GUI (the Main Event thread). This is standard in all GTK+ applications.
2. One thread for rendering the screen (done in the background and includes cache access and file system access for maps that are already downloaded).
3. Up to four threads for downloaded maps in the background.

Quote:

The best way to speed up the app is to avoid the three doing intensive jobs all together at the same time, so when GUI is busy the SW doesn't do saving, when downloading GUI should be told to wait, the central piece should be the cache manager.
Linux has a great thread manager, capable of interleaving many different threads to do many different things at once. There is no reason to delay certain processing until after a period of inactivity has already elapsed - it should be processing at every moment of inactivity.

gnuite 2008-01-16 03:25

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
Quote:

Originally Posted by iKneaDough (Post 128479)
Is there some way to defrag or optimize the maps .db files? MM2 used to work very quickly when I first started using it, but now I downloaded many maps and the .db file is 900mb and displaying of maps is much slower now, especially when changing zoom levels.

Actually, there is a function in the GDBM API to re-organize the files, but I don't provide the functionality in Maemo Mapper itself. I'll add a button in the "Manage Repositories" dialog to allow users to "reorganize" the file. It's also the only way that the database file can get smaller. (Space used by deleted maps is marked and reused when needed later.)

Depending on the size of the database, this operation might take a while....

iKneaDough 2008-01-16 03:42

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
Quote:

Originally Posted by gnuite (Post 128483)
Depending on the size of the database, this operation might take a while....

My database size is over 900mb so I sort of expect it to take a long while.
I was thinking of copying the file to my pc and optimizing it there. What packages would I need installed, and what command should I use?

I do notice a speed improvement in 2.3 over 2.2, however 2.3 does seem to crash more and harder.

Also, would it be possible to Auto-download only in some repositories and not others? Maybe put the Auto-download option on the "Manage Repositories" dialog as well, if it won't clutter it too much.

Thank you, gnuite for all the time and effort that you put into this great program, and for helping it's users!

jimmyh 2008-01-16 03:47

Re: Maemo Mapper sometimes wont start
 
i am using n800 with os2007 and while MM worked fine most of the time, it sometimes refuses to start after previously exiting from the application. when this happen i need to restart my tablet to get it working again.
i decided to use turn on cpu monitor on one occassion when MM wont start. it says MM was already running and taking up 36% of system ram. i killed the process and sure enough MM was able normally after that. MM seems to have exited improperly the last time taking up valuable system resource.
just wondering if anyone here encountered this.

nutter 2008-01-16 04:01

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
gnuite, thanks for clarification.

I am really not a linux/unix guy, in real life I am doing the real-time sw to make a living, plus windows as the side dish. Our company doesn't allow to deploy linux since the dispute with SCO(?) scares them, so they drew that policy 2 years ago.

I think your guys may give dbd, qdbm or tokyo cabinet some try, to see which is the fast dbm system. I will put the source code of my modified wingdbm soon, which removes the double memory allocation, and puts all gdbm functions into one file. So it's very easy to port that to other platform in static link, you can try that as well to see any performance gain.

MM is really a great toy which is very cool. As user, we're very please to see you guys make any progress.

nutter 2008-01-16 04:07

Re: Maemo Mapper v2.2 for OS2006/OS2007/OS2008
 
Quote:

Originally Posted by iKneaDough (Post 128479)
Is there some way to defrag or optimize the maps .db files? MM2 used to work very quickly when I first started using it, but now I downloaded many maps and the .db file is 900mb and displaying of maps is much slower now, especially when changing zoom levels.

If you never delete any map tile in db, then there is no gap, just the nature of gdbm, which becomes slower when the db grows too big.

If you used to delete the maps within it. Then you need to re-organize it since deleting doesn't shrink the gdbm file size actually, just leave a unused gap within the file.


All times are GMT. The time now is 17:22.

vBulletin® Version 3.8.8