on 06-10-2004 2:20 PM
Hello,
I am using a C# program as an external interface to SAP thru .net connector generated proxies.
whenever I try to create an instance of the proxy, it compiles it at the following line of code.
SAPProxyDll1.SAPProxyDll1 prox = new SAPProxyDll1.SAPProxyDll1();
This affects the performance a lot because I have a query based connection and for every query it goes thru the compilation cycle (of around 7-8 seconds).
Is there a way to avoid this? I tried using NGEN to register the SAP.connector.dll and my proxy dll, but that didn't resolve it.
Thanks a lot. I will change my code to retain the proxy longer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, thanks for the interesting question.
Well, you are right that the construction of a proxy is time consuming, but not as you assume because of JITting, but because all proxies ultimately inherit from Microsoft's SoapHttpClientProtocoll class for WebService clients. This class creates a XML Serializer for the Soap serialization - which in fact create some temporary C# files which are compiled to a temporary assembly.
This is indeed a slow process.
Currently MS doesn't allow to pre-generate the XML serializer DLL. This feature is announced for next .NET Release "Whidbey".
Anyway, you can easily workarround the issue by keeping the proxy for a longer time. E.g. you can have the proxy as a member variable of your application or form class.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.