Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Related to Performace of URLConnection.getOutputStream

Reply
Thread Tools

Related to Performace of URLConnection.getOutputStream

 
 
Lucky
Guest
Posts: n/a
 
      05-31-2006
Hi Folks,

In my Java application, the application is sending HTTP + SOAP request
to JBoss server. My observation is that for the very first request for
obtaining OutputStream object, application takes much time. And the
subsequent requests from the application does not take time for
obtaining the OutputStream object.

################################################## #########
HttpURLConnection httpConn = (HttpURLConnection) serviceURL
.openConnection();
-------
-------
-------
OutputStream out = httpConn.getOutputStream();

################################################## ###

Is there any reason behind this? Please let me know.


Regards,
Deepak

 
Reply With Quote
 
 
 
 
Matt Humphrey
Guest
Posts: n/a
 
      06-01-2006

"Lucky" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi Folks,
>
> In my Java application, the application is sending HTTP + SOAP request
> to JBoss server. My observation is that for the very first request for
> obtaining OutputStream object, application takes much time. And the
> subsequent requests from the application does not take time for
> obtaining the OutputStream object.
>
> ################################################## #########
> HttpURLConnection httpConn = (HttpURLConnection) serviceURL
> .openConnection();
> -------
> -------
> -------
> OutputStream out = httpConn.getOutputStream();
>
> ################################################## ###
>
> Is there any reason behind this? Please let me know.


There are so many reasons for this that the standard advice for evaluating
performance is to be sure to ignore the first few requests. The first time
JBoss encounters the request it must load the servlet classes and initialize
the servlet. This only ever happens once. For JSP pages, the page must be
compiled and then loaded. There are usually lots of classes that have to be
brought in for the first request, so all this is normal. Focus instead on
the performance of later requests.

Cheers,
Matt Humphrey http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp to asp.net + binary stream => performace issues David Purton ASP .Net 0 01-27-2006 02:10 AM
ASP.NET Page Performace Problem thisyr4leafs ASP .Net 2 08-26-2005 11:50 PM
Web page for STL container performace requirements? Stephan Br?nnimann C++ 2 11-10-2003 03:26 PM
VPN Encryption Cars and CPU performace Nick Bailey Cisco 7 10-21-2003 07:53 PM
VPN Encryption Cars and CPU performace Nick Bailey Cisco 0 10-18-2003 06:55 PM



Advertisments