This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

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.
 
Have you checked out Aspose?
 
subject: Page Loading time in struts
 
It's not a secret anymore!