Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, May 8, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: Performance issues
Conrad
Posts: 24
 
Performance issuesYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Sep 15 9:20 AM

I am successfully using a .NET (4.0) extension for accessing the Google Maps API. However, it is slooooow - like ~3 sec for the screen to update with the resulting mileage. Here is my (pseudo-)code in the dll:


using System;
using System.IO;
using System.Net;
using System.Xml;

byte[] response;
string url = "https://maps.googleapis.com/maps/api/distancematrix/xml?sensor=false&units=imperial&origins=<MyOrigin>&destinations=<MyDestination>";

using (WebClient wc = new WebClient())
{
    response = wc.DownloadData(url);
}

MemoryStream ms = new MemoryStream(response);
XmlReader reader = XmlReader.Create(ms);

reader.ReadToFollowing("distance");
reader.ReadToFollowing("value");
string strMeters = reader.ReadInnerXml();
int intMeters;
Int32.TryParse(strMeters, out intMeters);
return intMeters / 1609;


Nothing too fancy. I would think that doing this repeatedly would speed things up, so that the code is cached, but that doesn't help. Any suggestions on how to improve the response time?

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/8/2024 10:32:42 AM