MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




slow retriving for distance and drivingtime

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-20-2008
Junior Member
White Belt
 
Join Date: Jan 2004
Posts: 7
Question slow retriving for distance and drivingtime

i have a app. who have to do a cross table of distance and duration between 10 000 postal code so i have 100 000 000 request to do ...

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-20-2008
Senior Member
Green Belt
 
Join Date: Sep 2005
Location: Marshall, Michigan
Posts: 135
Post Re: slow retriving for distance and drivingtime

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-20-2008
Junior Member
White Belt
 
Join Date: Jan 2004
Posts: 7
Wink Re: slow retriving for distance and drivingtime

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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-20-2008
Senior Member
Green Belt
 
Join Date: Sep 2005
Location: Marshall, Michigan
Posts: 135
Post Re: slow retriving for distance and drivingtime

- 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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-27-2008
Junior Member
White Belt
 
Join Date: Jan 2004
Posts: 7
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 11-28-2008
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 11-28-2008
Junior Member
White Belt
 
Join Date: Jan 2004
Posts: 7
Red face Re: slow retriving for distance and drivingtime

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 11-28-2008
Winwaed's Avatar
Mapping-Tools.com
Black Belt
 
Join Date: Feb 2004
Posts: 1,142
Blog Entries: 22
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
distance, drivingtime, retriving, slow


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/slow-retriving-distance-drivingtime-9139.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


All times are GMT -5. The time now is 10:13 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Algarve Holiday
Portuguese all year round sunshine is some of what awaits you if you choose the Algarve holiday option through UlookUbook!



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59