Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP processing time without Network delay  RSS feed

 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have struts architecture using JSPs for the view. JSP includes custom application tag to render user specific data. I would like to measure the pure processing time of a JSP. It means that I would like to find out total processing time on JSP minus time taken to send the data over the network. I have experienced that sometime JSP processing time is 47 ms and other times it 380 ms. I don't think application server is slow in processing requests when JSP processing time is high.

I would appreciate your help.

Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried hitting your JSP from the local machine?
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben, Thanks for the response.

I have struts architecture which is based on MVC Model 2 and JSP is last item that gets processed before writing data to the wire. I believe (correct me if I am wrong) if someone is on a slower network then I will get higher JSP processing time as compared to someone on the faster network. I don�t think I will see any increase in action class processing as action class processing does not get impacted by network performance.

I get processing time around 62 -78 ms expect the first time I got it around 313 ms.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The speed of the network connection is completely moot with regards to JSP processing time. JSP is translated, compiled and executed completely on the server. The only effect network latency has is on how long it takes the response to be sent back to the client.

Depending upon how the container implements the response buffer, you could possibly see stalls during the execution of a JSP while the output sub-system flushes buffers to a slow connection, but I suspect most modern containers handle this pretty intelligently.

What is it that you are actually trying to get a handle on?
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do understand that JSP is compiled and executed solely on server but I would like to separate the time it take to compile and execute, and time it take to write the response back on the network. I am measuring JSP processing time by getting the start time at the beginning of the JSP and end time at the end of the JSP.

If I access the JSP on the server (using remote desktop and opening a browser on the server), it takes only 47 -67 ms to process the JSP. Same JSP take 200-350 ms when it is accessed remotely over the network. I believe JSP execution slows down if the client is on the slower network. What I mean is that JSP response write is slower and that why I get the higher JSP processing time as all the data is not getting buffered on the Server.

I have Sybase EA Server 5.3 and my JSP�s generated output is around 120 KB. I know that response buffer on EA Server is 8KB and maximum MTU (maximum transmission unit) size on most networks is about 1.5 KB. My window size on server is 65535.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Kappor:
I believe JSP execution slows down if the client is on the slower network.

I believe that your test methodology is suspect.
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have any suggestion how I could seperate JSP execution. What methodology should I use?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a big JSP! What kind of output is it generating? HTML, Excel, PDF, XML, etc.
 
Rahul Kappor
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of the output is HTML, Java Script. We are using PowerBuilder components to generate HTML from PowerBuilder Data window.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!