wood burning stoves 2.0*
The moose likes Struts and the fly likes Page Loading time in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Page Loading time in struts" Watch "Page Loading time in struts" New topic
Author

Page Loading time in struts

paresh doshi
Ranch Hand

Joined: Nov 20, 2006
Posts: 81
In my application a query returns 5000 records. The query execution takes around 2-3 second, but the population of data into bean and arraylist is around 50 seconds. How can i reduce the loading time of the page.

Please help.


Thanks.<br />Paresh Doshi<br />SCJP 1.4
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30146
    
150

Are you showing all 5000 records to the user at once? Consider using paging. The user is unlikely to look at all those records.

If you need all the records in one shot (say for a download), you could using a streaming download so the download starts while you are processing later records.

To make the whole process faster, use a profiler. Or at least some System.out.println statements to see where the bottleneck is.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30146
    
150

If the database is on a remote machine, network time may be a factor. You could see if you are returning any unused columns in the query.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page Loading time in struts
 
Similar Threads
How swing follows MVC pattern
Want to improve page loading time which is affected due to large no of input textbox
Performance issue(Loading the page)
Performance issue while loading JSP
do i have to use session here ?