By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,708 Members | 1,677 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,708 IT Pros & Developers. It's quick & easy.

How to speed up the webservice proxy creation

P: n/a
In my winform application, to access webmethod, we create a webservice
proxy object. For the first time, when winform application is started,
for creating proxy object(e.g. MyWebServiceProxy oProxy = new
MyWebServiceProxy() )it takes a long time(appr. 2 seconds), but for
the next time it happens in 0-10 milli-seconds.

For each proxy object for first time creation it takes looong time.
One reason I know is because of JIT compilation(MSIL is converted into
m/c code each time.)

What can be other reasons? How can I speed-up proxy creation at first
time?
Note: I cannot use NGen bcoz of limitations of NGen(requires admin
login)

Pls help me.

Thanx and regards
Atul
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

What is happening is that the serializer for the types exposed/consumed by
the proxy is generated on first use. To resolve this, pre-run each
application and ship the generated custom serializer assembly with the
application bits. Another thing you could consider is creating an instance
of the proxy class during your installation process - so that the
serailizers are pre-created when you install.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: at**********@itb-india.com (Atul)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: How to speed up the webservice proxy creation
Date: 28 Nov 2004 21:21:15 -0800
Organization: http://groups.google.com
Lines: 19
Message-ID: <f5**************************@posting.google.com >
NNTP-Posting-Host: 61.11.19.150
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101705676 21797 127.0.0.1 (29 Nov 2004
05:21:16 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Mon, 29 Nov 2004 05:21:16 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7670
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

In my winform application, to access webmethod, we create a webservice
proxy object. For the first time, when winform application is started,
for creating proxy object(e.g. MyWebServiceProxy oProxy = new
MyWebServiceProxy() )it takes a long time(appr. 2 seconds), but for
the next time it happens in 0-10 milli-seconds.

For each proxy object for first time creation it takes looong time.
One reason I know is because of JIT compilation(MSIL is converted into
m/c code each time.)

What can be other reasons? How can I speed-up proxy creation at first
time?
Note: I cannot use NGen bcoz of limitations of NGen(requires admin
login)

Pls help me.

Thanx and regards
Atul

Nov 21 '05 #2

P: n/a
Atul:

Other than what Dan said, with .NET Framework 2.0, our lifes will be
simplifies because it comes with a tool called sgen.exe that pre-generates
all the serialization assemblies.

Thanks,
Mujtaba.
"Dan Rogers" <da***@microsoft.com> wrote in message
news:cZ**************@cpmsftngxa10.phx.gbl...
Hi,

What is happening is that the serializer for the types exposed/consumed by
the proxy is generated on first use. To resolve this, pre-run each
application and ship the generated custom serializer assembly with the
application bits. Another thing you could consider is creating an
instance
of the proxy class during your installation process - so that the
serailizers are pre-created when you install.

I hope this helps

Dan Rogers
Microsoft Corporation
--------------------
From: at**********@itb-india.com (Atul)
Newsgroups: microsoft.public.dotnet.framework.webservices
Subject: How to speed up the webservice proxy creation
Date: 28 Nov 2004 21:21:15 -0800
Organization: http://groups.google.com
Lines: 19
Message-ID: <f5**************************@posting.google.com >
NNTP-Posting-Host: 61.11.19.150
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1101705676 21797 127.0.0.1 (29 Nov 2004
05:21:16 GMT)
X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Mon, 29 Nov 2004 05:21:16 +0000 (UTC)
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFT NGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!not-for-mail
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7670
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

In my winform application, to access webmethod, we create a webservice
proxy object. For the first time, when winform application is started,
for creating proxy object(e.g. MyWebServiceProxy oProxy = new
MyWebServiceProxy() )it takes a long time(appr. 2 seconds), but for
the next time it happens in 0-10 milli-seconds.

For each proxy object for first time creation it takes looong time.
One reason I know is because of JIT compilation(MSIL is converted into
m/c code each time.)

What can be other reasons? How can I speed-up proxy creation at first
time?
Note: I cannot use NGen bcoz of limitations of NGen(requires admin
login)

Pls help me.

Thanx and regards
Atul

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.