PDA

View Full Version : Speed up MP loading in VB.NET ?



marcick
02-07-2012, 03:47 AM
Sorry I try again to post this question:

anybody know some trick to speed-up the loading of a map in a control of VB.NET ? (MappointControl1.NewMap(MapPoint.GeoMapRegion.geo MapEurope))
I have to open two map and it requires about 30 seconds. At least I would like to have the possibility to do something other during map loading ...
Also the command to close the map exiting the application is quite slow.
Marco

Eric Frost
02-07-2012, 08:23 AM
I don't really know a way to speed these things up, it just takes a while to load a MapPoint instance into memory. I have noticed it's faster to open a second, third, or fourth instance of MapPoint. This might sound a little crazy, but you could potentially have a hidden instance of MapPoint loaded when the OS boots up.

marcick
02-07-2012, 08:40 AM
This is my set:

AMD Athlon X2 2,7GHz
4GB Ram
Win7 home 64 bit
Mappoint 2010 Europe
Visual basic 2010 Express

The instruction MappointControl1.NewMap(MapPoint.GeoMapRegion.geo MapEurope)
requires about 20 seconds
and also opening a second map I don't see differences of speed.

So, when the user launch my program, need to wait about 40 seconds. I have a splash screen for this, but it's really annoying, considering that the target machine for my application has lower performances and times increase much.
It would be nice if at least I could do something other while map is loading, giving the user a different feeling than looking a splashscreen or hourglass for one minute ...

booboobear0523
02-16-2012, 01:52 PM
Hi, marcick,
How about putting the slow-running map-loading code in a separate (asynchronous) thread? That way your UI can remain responsive while your map is loading. MSDN has asynchronous programming guidelines that you can follow so that you don't get yourself into trouble.

Regards,

booboobear0523 in NYC

marcick
02-17-2012, 01:59 AM
Hi,
I heard about that but sounds to me a bit difficult to manage. I'll have a look again on MSDN, thanks for your hints.
Regards
Marco in Milan

booboobear0523
02-17-2012, 08:34 AM
Hi,
I heard about that but sounds to me a bit difficult to manage. I'll have a look again on MSDN, thanks for your hints.
Regards
Marco in Milan

I think the most difficult aspect of this is making sure that the map processing that you do in a separate thread is correctly synchronized and coordinated with the main user interface thread.