The Artima Developer Community
Sponsored Link

Java Answers Forum
jsp performance problems

3 replies on 1 page. Most recent reply: May 29, 2003 4:36 AM by George

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
George

Posts: 2
Nickname: gl
Registered: May, 2003

jsp performance problems Posted: May 28, 2003 12:19 AM
Reply to this message Reply
Advertisement
i was asked to debug a crappy jsp program and was successful fix the problems in the code. however im having performance problems. when i run the jsp with my pc's tomcat it seems fine but when i transfered it to the server and accessed it remotely, the speed sucks. i was thinking that the slowing down was caused by the hard coded SQL statements on the jsp page which should have been placed within the java bean class. Is it the network? Is it the server or is it the crappy code? I really have no idea. i'm just an OJT in the company im working at and all I know is coding and debugging my java and jsp. Please help.


Singh M.

Posts: 154
Nickname: ms
Registered: Mar, 2002

Re: jsp performance problems Posted: May 28, 2003 3:53 AM
Reply to this message Reply
Post the code of the jsp.

Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: jsp performance problems Posted: May 28, 2003 5:33 AM
Reply to this message Reply
You should setup a Tomcat to run on your desktop and try various solutions.

I would make up a load test that repeatedly calls the database connection noting the system time in milliseconds before and after for each load test.

My first guess is that your jsp page is making a new connection for each database query, when the same connection object can be reused. You may need to check in to connection pooling to speed your database interactions up.

A lot has been written by others on this very topic.

Try an internet search on Tomcat connection pooling.

George

Posts: 2
Nickname: gl
Registered: May, 2003

Re: jsp performance problems Posted: May 29, 2003 4:36 AM
Reply to this message Reply
I think I'll just try to restructure the code and try to optimize along the way. Thanks, Charles. I'll try to do what you have suggested.

Flat View: This topic has 3 replies on 1 page
Topic: how can i call one applet with another?? Previous Topic   Next Topic Topic: Java DOM - parse synchronous mode

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use