The profile results from this web service ctor are staggering. I still don't know what's exactly going on, except that it's reflection related.
2.25 million calls to System.Reflection's CustomAttribute.CreateCaObject. (about 2 minutes with children) 71 million occurences of Intptr.ToPointer , about 45 seconds (no children) 53 million IntPtr..ctor calls, 40 seconds (no children) 39 million RuntimeType.GetTypeHandleInternal calls, 30 seconds (no children) 3 million calls to System.Reflection.CustomAttribute.FilterCustomAttributeRecord , 6 minutes with children. Phil Wilson -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Wilson, Phil D Sent: Wednesday, July 12, 2006 1:44 PM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Web Services - Serialization & Opimizations Good thought, but the constructor for the web service is still taking 3 minutes. In debug mode just before it exits the ctor I see the "Loaded '......XmlSerializers.dll' message, so whatever is going on is before that. So perhaps it's not a serialization thing after all. For info, this webservice where the wsdl generates 51k+ lines of C# proxy is the VMWare ESX 3.0 webservice that's used to drive VMWare and virtual machines. Phil Wilson -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Richard Blewett Sent: Wednesday, July 12, 2006 12:49 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] Web Services - Serialization & Opimizations You tried running sgen.exe against the types to pre-gen the serialization assembly? Regards Richard Blewett - DevelopMentor -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] On Behalf Of Wilson, Phil D Sent: 11 July 2006 20:16 To: [email protected] Subject: [ADVANCED-DOTNET] Web Services - Serialization & Opimizations I'm connecting to a web service with a VS 2005 client. It takes a long time (nearly 3 minutes) before the code actually starts doing anything. At first I thought this was a JIT thing going on, but I think that what's actually happening is that custom assemblies are being created to handle the serialization. I know this happens in many serialization cases. A profiler run seems to imply this, as well as the fact that the last line in the debug output text is something like "'SimpleClient.exe' (Managed): Loaded '-squ_ecj', No symbols loaded." where the name of what's loaded is random. The proxy generated by the WSDL is more than 51k lines of C#. Assuming I've diagnosed this correctly, and keeping in mind that I don't own this web service, is there anything I can do to improve this start-up cost? (Ngen doesn't appear to offer anything to deal with this. ) Phil Wilson =================================== This list is hosted by DevelopMentor. http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
