• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Optimize JSP Page loading time - very urgent......

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
My jsp page is taking long time to load. I have several list boxes in the page and one of the listbox contains around 1 million records. Is there a better way to optimize my page so that it load fastly. It also taking more time even i load the listbox with 1million records in ajax using javascript separately.
Give me a better solution.
I am using JSP & STRUTS to display the page. I use <html ptions collection-""> tag to display the contents of the listboxes.


<html:select property="deviceNameId" multiple="true" size="4">
<option value="any" selected>Any</option>
<html ptions collection="DEVICE_LIST" property="deviceId" labelProperty="deviceName" />


</html:select>



Thanks in adavance.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very urgent response:

DON'T try to load all million records in a web page.

How in the world do you expect a user to use a list box to hunt through a million records

Think about how the user wants to find stuff and redesign your application.

How are the records organized? How do users locate the desired record?

Bill
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by arun dangerous:
one of the listbox contains around 1 million records.



This is what is called a "Doctor Doctor" problem. The answer is "don't do that!"

As suggested upthread, more than 30 entries or so is a waste.
 
arun ramk
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Thanks for your suggestions.
I have redesigned the list box in such a way that , initially i load it with 1000 items and when the user scrolls the list box to the end an event should be trigger and i will append the next 1000 items using ajax. Is there a way to find the scroll bar end event in html or dhtml or javascrpt and a way to load the items in the list box when the scroll bar the dragged to the end.
Thanks in advance.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"arun dangerous"-

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, you're still missing the point about the length of the menu. No user will want to scroll through 1000 entries, either. You need to find a way to structure the options in some way, probably hierarchically.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ulf is exactly right, your current approach would only work well for the first few thousand items.

Step back from the current approach and think about how a typical user will want to look up data. Talking to real users is a good idea! Showing users mockups of proposed designs will help.

If you cant think of any other way than a list box then you need to provide an interface that can take big steps through the list, but surely there must be some organizing principle to this data. Dont think of adding items to the list box, clear and refill it after each jump.

If you want better suggestions, show us some typical data entries.

Bill
 
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic