problem: Calling Java webservice performance .net 2.0 vs .net 3.5
Dan <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <7B400E9DC1E94170B23A54774DC6BE02@skiikPC> |
Im trying to track down a problem im having to do with poor performace calling a webservice written in java.. All the webservice does is take a name and return MR on front of it, however running a console app it takes about 200 ms per call. i Copied and pasted the same code into a 2008 project and ran the same test. It is alot faster.
In 2005 i average 200 ms a call, in 2008 the same program calling the same webservice from the same computer takes 5 ms.
Can anyone help me identify what the problem may be
2008 code
static void Main(string[] args)
{
dev01.CopyPortClient ser = new CopyPortClient();
for (int i = 0; i < 10000; i++)
{
DateTime dt = DateTime.Now;
Person p = new Person();
p.FirstName = "Bob";
p.LastName = "Jones";
ser.CopyOperation(ref p);
TimeSpan ts = ((TimeSpan)(DateTime.Now - dt));
Console.WriteLine(i.ToString() + ":" + p.FirstName + " " + ts.TotalMilliseconds);
}
}
2005 code
static void Main(string[] args)
{
dev01.casaService1 ser = new casaService1();
for(int i=0;i<10000;i++)
{
DateTime dt = DateTime.Now;
Person p = new Person();
p.FirstName = "Daniel";
p.LastName = "Young";
ser.CopyOperation(ref p);
TimeSpan ts = ((TimeSpan) (DateTime.Now - dt));
Console.WriteLine(i.ToString() + ":" + p.FirstName + " "+ ts.TotalMilliseconds);
}
}
My Blog: http://dansthoughts.istop.ws
===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives