File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page Loading time in struts

 
paresh doshi
Ranch Hand
Posts: 81
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic