Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on slow retriving for distance and drivingtime within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; i have a app. who have to do a cross table of distance and duration between 10 000 postal code ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| i had already a code to retrive data from googlemap but it was to slow so we went with the mappoint activeX and it's about the same time... is their any way to make it faster for the method "Calculate" of the object "Route" i have try to set some viewing property to false like... oApp.ItineraryVisible = False oApp.PaneState = geoPaneNone Thx Martin Fortier |
| |||
|
You will gain some speed improvements if you... - Ensure the map is not visible (i.e. minimized) while calculating routes - Process your routing within the visible extents of the map - Use either the Night or Road map styles - Process the postal codes in sorted order - Perform regular garbage collection of route and waypoint objects - Re-create the ActiveMap object on every ~100th route calculation - Temporarily disable window updates to the activemap (WinAPI call) HTH Paul |
| |||
|
Hi Thx for the answer, but im new with mappoint and i need some method name or something... - Ensure the map is not visible (i.e. minimized) while calculating routes ? MapPoint.Application.visible = false ? - Process your routing within the visible extents of the map ? if the map is invisible why doing this ? - Use either the Night or Road map styles ? if the map is invisible why doing this ? - Perform regular garbage collection of route and waypoint objects ? how can i do this ? - Temporarily disable window updates to the activemap (WinAPI call) ? how can i do this ? |
| |||
|
- Ensure the map is not visible (i.e. minimized) while calculating routes ? MapPoint.Application.visible = false ? That, or MapPoint.Application.WindowState=Minimized - Process your routing within the visible extents of the map ? if the map is invisible why doing this ? Even though the map is invisible, it is still executing in windowed memory space. It's internal methods will still post WM_PAINT, WM_SETTEXT, WM_USER etc. messages while executing. Most notably, it will still DRAW items to the map even though it is not currently visible. This is CPU-intensive and thread-intensive. - Use either the Night or Road map styles ? if the map is invisible why doing this ? {see #2 above} Reduced colors and reduced map objects (levels of detail) - Perform regular garbage collection of route and waypoint objects ? how can i do this ? if you use any variables or references to the ActiveRoute and ActiveMap objects, let them fall out-of-scope or implicitly destroy them and force garbage-collection. See the MSDN help topic for GC.Collect() - Temporarily disable window updates to the activemap (WinAPI call) ? how can i do this ?[/quote] see this post: http://www.mapforums.com/sitemap/t-7081.html |
| |||
| Re: slow retriving for distance and drivingtime
Thx for the trick but lockwindow and minimized does not make it faster... (even try the sendmessage() for minimize) now it's getting a little faster... i can retreive 100 Distance and drivingtime in 48 Sec Do you think i could go faster than 100 value in 48 Sec Thx Martin Fortier |
| |||
| Re: slow retriving for distance and drivingtime
Hi, If you have a multiprocessor machine then you could split up the work into a few threads, creating in each thread a mappoint object and do part of it there. be sure not to cross-thread the objects. On a single CPU machine this will not gain any speed, in contrary it will slow down.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
yes i could do that. But first , can you tell me if .5 sec for a caculation of driving time and distance is about the best i could get or i cant make it go faster ? because i need to change the hole logic behind my code if it's the best i can get... Thx a lot for all responder |
| ||||
| Re: slow retriving for distance and drivingtime
Wilfried: And we have a product that does this 48 seconds for 100 routes sounds good going for a single MapPoint instance on a single thread, although of course it depends a lot on the length of the routes. Richard
__________________ Winwaed Software Technology LLC http://www.winwaed.com See http://www.mapping-tools.com for MapPoint Tools See the Geoweb Guru for online mapping |
![]() |
| Tags |
| distance, drivingtime, retriving, slow |
| ||||
| Posted By | For | Type | Date | |
| GPS and Other New Features in MapPoint 2009 - MapPoint Articles - MP2K Magazine | This thread | Refback | 11-21-2008 04:47 AM | |
| Using MS MapPoint in PowerBuilder - MapPoint Articles - MP2K Magazine | This thread | Refback | 11-20-2008 08:48 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CloseMap is slow | gflynn | Development | 4 | 10-23-2007 10:16 AM |
| VB .NET is so slow! | Anonymous | MapPoint 2006/2009 Discussion | 2 | 07-28-2004 03:17 AM |
| moving through recordset is slow | stephenmillington | MapPoint 2006/2009 Discussion | 0 | 07-07-2004 05:28 AM |
| Retriving an image | Anonymous | MapPoint 2006/2009 Discussion | 1 | 11-27-2003 07:42 PM |
Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!