Solved

WebService slow on first call

Posted on 2007-11-27
2
2,296 Views
Last Modified: 2013-11-26
I have a Visual Basic 2005 application runniing in windows CE 5.0. The VB application calls a WebService. The first time the WebService is called it takes 3 to 4 seconds (which is slow). After this it takes less than 1 second. If I leave my form and return to my form the WebService is slow again. The webService is created in the Main module.

How to make the first call also fast?

Regards,

dgb
0
Comment
Question by:dgb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 3

Expert Comment

by:IUFITS
ID: 20375565
It's very likely slow on the web site that the web service is on.  Asp.Net sites will leave memory after they timeout and when it gets a hit, it comes back into memory which takes a few seconds (I'm not sure how long this is until the time out occurs by default, until the last session times out probably).  This is almost certainly the issue unless the web service is seeing it's 2nd and 3rd run performance increase from say, a SQL query being cached.  There's a few things you can do about this, #1 being the easiest:

1.)  Have a job run that touches a page on the web-site every 20 minutes or so.  This will keep the site in memory.  You don't even have to execute code, just touch a blank page.  I've used an http command line program I wrote to do this pulling up a blank page before people arrive in the morning so the first person doesn't get a slow load.  
2.)  Make sure the web site with the web service isn't in Debug mode which will slow things down greatly (this is set in the web.config file).  If it has to load up debug symbols it will run slower all the time.
0
 
LVL 3

Accepted Solution

by:
IUFITS earned 500 total points
ID: 20375589
You can grab the http command line utility I wrote, source and executable at (it's pretty basic, and I think this is an old version but it'll do the trick... the old version used the My namespace to download and the new version uses .Net classes that are standard across languages):

http://www.blakepell.com/Main/Development.aspx
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why use this lambda? 12 92
Looking for a link to download the latest .NET redistribution package 5 41
SSIS Column mapping 5 38
search by any word in column 5 26
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question