change Data.gmdb location?

Jul 20, 2010 at 12:01 AM

Hello all,

I'm kind of new to this so please excuse me if I'm asking a questions that has been asked before. 

Is there a way in code to specify a location for the Data.gmdb other than the default

C:\Documents and Settings\<user>\Local Settings\Application Data\GMap.NET\TileDBv3\en

I'd like to put the data file in a location so that all users on a pc access the same file.

Thanks and thanks for making such a great control

Jul 20, 2010 at 5:51 AM

MainMap.CacheLocation = @"C:\GMapCache\";

Jul 20, 2010 at 8:51 AM

Any posibility to change file system read / write buffer size?

Right now it's 1024 bytes but google tile for example have 256x256 image size and 23405 byte size.

My system disk is SSD so I not notie how many work with it. But just using CacheLocation to regular HDD and ...........

Jul 20, 2010 at 9:35 AM

tiles are stored in sqlite db, all buffers are internal

Jul 20, 2010 at 4:57 PM

how do you know it reads in 1K chunks?

Jul 20, 2010 at 5:44 PM

p.s. i've increased page size for sqlite, can you confirm that it change something?

Jul 20, 2010 at 6:33 PM
Edited Jul 20, 2010 at 6:34 PM

When I specify

gMapControl1.CacheLocation = @"C:\GMapCache\";

and run the application a folder is created at C:\GMapCache\TileDBv3\en and a new Data.gmdb of 6kb is created and put there.  The original file C:\GMapCache\Data.gmdb is 55,000 kb.  Also, the application shows blue tiles which say "Exception: No data in local tile cache..."

I am using 

gMapControl1.Manager.Mode = AccessMode.CacheOnly;

Thanks for creating and sharing such a great product.


Jul 20, 2010 at 7:34 PM
Edited Jul 20, 2010 at 7:43 PM
radioman wrote:

p.s. i've increased page size for sqlite, can you confirm that it change something?


Program working with HDD less.

But tile loading slower :( on first loading (from server)

for test was use new and 3 build ago sources.

Jul 20, 2010 at 7:47 PM
Edited Jul 20, 2010 at 8:11 PM

did you test it on the same database or fresh?

p.s. i've just tested latest and before changing size, timing pretty the same ~800ms for windows forms demo in debug mode

..maybe it's different on ssd, can't test, whats your averange timing?


update to newest version and set:

set MainMap.CacheLocation = @"Q:\Tmp\";

load few times Demo.WindowsForms, just execute, wait for load complete and close, look at tile loading time in debug trace


then update to one version before and repeat the same, and does numbers really different?

Jul 21, 2010 at 8:54 AM
Edited Jul 21, 2010 at 9:00 AM

I test all on empty folders on regular HDD. All tests was done in WPF demo project.

Old version 6e4b902bd621 not have OnTimeLoadedComplete record in debug output.

Last version have next record

Thread[15] - OnTileLoadComplete: 9200ms, MemoryCacheSize: 0.905835151672363MB

Also I take SQLitePureImageCache.cs from old source into new and got next result:

Thread[13] - OnTileLoadComplete: 12735ms, MemoryCacheSize: 1.80849742889404MB


So look like problem not in last update but in previouse updates. My screen resoulution 1600x1200 so many tile for load. But even visuly it's big differentce in load (beatween 6e4b902bd621 and new version) somthing list in 3-5 times longer.


P.S. to check HDD activity - I use Process Monitor.

P.S.S. maybe 32 kb too many as for buffer size?

Jul 21, 2010 at 9:00 AM
Edited Jul 21, 2010 at 9:01 AM

thats first time load from server, you need to run it few times to get hdd cache times, they are about 1s, can you repeat test once again? ;}

Jul 21, 2010 at 9:05 AM
Edited Jul 21, 2010 at 9:08 AM

you right, but I was write that problem with first load.

New version and old version show different time in first load (from server).

Old version load full screen in 3 - 4 seconds. And new need more then 10.

Jul 21, 2010 at 9:09 AM

hm.. but that not the case ;} ..anyway does that timing keeps on all maps?

Jul 21, 2010 at 9:15 AM

yes, I write that problem not in last update.

and yes - difference present for all map providers.

you was done tile loading thread optimization after 6e4b902bd621 update. Maybe here some problems?

Jul 21, 2010 at 9:21 AM

does previous version loads always faster?

Jul 21, 2010 at 9:23 AM


Jul 21, 2010 at 9:30 AM
Edited Jul 21, 2010 at 9:31 AM

can you show me timings? Did you tested it in ServerOnly mode?

Jul 21, 2010 at 9:49 AM
Edited Jul 21, 2010 at 9:53 AM

Yes, server only test show same result.

I was show you timing for new version 9 - 12 sec.

Sorry just find in old version debug log:

OnTileLoadComplete: 2601ms, MemoryCacheSize: 1.46893501281738MB

OnTileLoadComplete: 2149ms, MemoryCacheSize: 1.79831981658936MB

Jul 21, 2010 at 9:55 AM

And new version:

Thread[14] - OnTileLoadComplete: 5241ms, MemoryCacheSize: 1.10212135314941MB

Thread[14] - OnTileLoadComplete: 4497ms, MemoryCacheSize: 1.58907318115234MB

Thread[13] - OnTileLoadComplete: 4254ms, MemoryCacheSize: 1.9487771987915MB

Jul 21, 2010 at 9:59 AM

Test in ServerCache mode with empty cash:

1. Old version

OnTileLoadComplete: 2968ms, MemoryCacheSize: 0.403403282165527MB

OnTileLoadComplete: 2308ms, MemoryCacheSize: 1.25774478912354MB

2. New version:

Thread[14] - OnTileLoadComplete: 6211ms, MemoryCacheSize: 0.905904769897461MB

Thread[14] - OnTileLoadComplete: 6314ms, MemoryCacheSize: 1.37711906433105MB