Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Servlets and the fly likes How to decrease the download time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to decrease the download time" Watch "How to decrease the download time" New topic

How to decrease the download time

Anil aleti

Joined: May 02, 2000
Posts: 9
I have written a jsp file . It's size is 50KB.I am connecting to Database in this file.It is taking two minutes of time to download whereas other files with the same size are getting downloaded in vary less time.Can any one tell me what are the common causes for such kind of unusual behaviour and What is the remedy for this.

Todd M Bush

Joined: Apr 26, 2000
Posts: 22
JSPs are not "downloaded". They are executed on the server and html is sent to the browser. JSPs are compiled the first time they are accessed, which might contribute you the long wait time. Also, if you are connecting to a database you might want to look into using some pool database connection instead of making a new connection every time the page is accessed. This will definately cut you wait time.
Anil aleti

Joined: May 02, 2000
Posts: 9
ya, I know that JSP is not downloaded and I am talking about the output html it produces.When a JSP file is first time accesed it gets compiled.Even second time onwards also it is taking lot of time.I am using Connection pool.Please tell me somne common methods to be adopted to improve performance and optimizing code.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
I am betting that the delay is all on the Database connection side. Why don't you make up a test application to exercise that connection without the confusing factor of a JSP.
Anil aleti

Joined: May 02, 2000
Posts: 9
Thank You.I will try this.
I agree. Here's the link:
subject: How to decrease the download time
Similar Threads
Please help me test my app
what's difference between the new assignment and the old one?
question on WSAD
handwriting script recognition
How to get the file length before download