aspose file tools*
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
Author

How to decrease the download time

Anil aleti
Greenhorn

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.

aaa
Todd M Bush
Greenhorn

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
Greenhorn

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
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
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
Greenhorn

Joined: May 02, 2000
Posts: 9
Thank You.I will try this.
Anil
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to decrease the download time