Re: problem: Calling Java webservice performance .net 2.0 vs .net 3.5
Chad Yost <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <017401c941cd$2c25b6a0$847123e0$@net> |
We had the same problem, and I ran a perf trace, and found that the SoapHttpClientProtocol constructor does a lot of reflection to generate serialization information. Even if we used SGen to generate the serializers, there were cases where it still took 7 seconds to run the SoapHttpClientProtocol constructor the first time (after that it was cached). We fixed this by starting a thread and constructing the object (but not running a method) in the thread at app startup. That way we didn't have a big slow down the first call. chad -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of Richard Blewett Sent: Thursday, November 06, 2008 1:29 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] problem: Calling Java webservice performance .net 2.0 vs .net 3.5 If the creation of the proxy was inside the loop then I would have said you were definitely on to something as, when using the generated proxy class, in 3.5 (maybe SP1) they cache the ChanelFactory whereas in 3.0 they didn't. But from the OP code they create the proxy outside of the loop so the caching of the ChannelFactory can't be the issue. However, the infrastructure could still be different and do exactly as you are saying. Wire Shark should show either way Rich > -----Original Message----- > From: Discussion of advanced .NET topics. [mailto:ADVANCED- > [email protected]] On Behalf Of Greg Young > Sent: 06 November 2008 19:20 > To: [email protected] > Subject: Re: [ADVANCED-DOTNET] problem: Calling Java webservice > performance .net 2.0 vs .net 3.5 > > I am going to take a really obvious guess that the 3.5 version is > reusing a connection to the server where as the 2.0 version is using a > new connection for every request. > > Should be easy enough to test that. > > Cheers, > > Greg > > On Thu, Nov 6, 2008 at 11:00 AM, Dan <[email protected]> wrote: > > Not sure what protocal it uses. > > > > There is WCF for 2005 aye, however do i lose the ability to use the > vs > > designer tools to create proxies. > > > > The other odd ball that i forgot to mention is both programs run fine > > against .net web services, and heres the gotcha the .net 2.0 version > works > > fine if it goes through a web proxy. I setup my web service to use > the isa > > server, and speed was fine. I then attached fiddler which does deep > > inspection of web traffic by intercepting it through its built in > proxy and > > it runs fine too. > > > > Only direct peer to peer connection seems to have problems. Im about > to > > test it on a non vista pc to see if it makes any difference > > My Blog: http://dansthoughts.istop.ws > > > > ----- Original Message ----- From: "Richard Blewett" > <[email protected]> > > To: <[email protected]> > > Sent: Friday, November 07, 2008 12:22 AM > > Subject: Re: [ADVANCED-DOTNET] problem: Calling Java webservice > performance > > .net 2.0 vs .net 3.5 > > > > > >> The 2008 code appears to use WCF to make the call. What about the > 2005 - > >> is > >> that using WCF or SoapHttpClientProtocol? > >> > >> Rich > >> > >>> -----Original Message----- > >>> From: Discussion of advanced .NET topics. [mailto:ADVANCED- > >>> [email protected]] On Behalf Of Dan > >>> Sent: 06 November 2008 09:26 > >>> To: [email protected] > >>> Subject: [ADVANCED-DOTNET] problem: Calling Java webservice > performance > >>> .net 2.0 vs .net 3.5 > >>> > >>> 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 > >> > >> =================================== > >> View archives and manage your subscription(s) at > >> http://peach.ease.lsoft.com/archives > > > > =================================== > > View archives and manage your subscription(s) at > > http://peach.ease.lsoft.com/archives > > > > > > -- > It is the mark of an educated mind to be able to entertain a thought > without accepting it. > > =================================== > View archives and manage your subscription(s) at > http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives