Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

List Box Popluation Speed

I have developed a simple application using J2ee arch. For a enquiry screen we need to populate 2 list boxes "Vendor from" and "vendor To" . The list box has 5000 records. due to this list box popluation, the page load takes 15-20 seconds. the customer wants a load time of 1-2 seconds. is there any way of achieving this ? The bean returns the records from the db in milli seconds - it is the popluating the list box in the front end which is the bottleneck.

The Vendor From and To list popluates the same records from a single table which is indexed by Vendor Name

Any ideas is appreciated.
0
venkatcg
Asked:
venkatcg
  • 3
  • 2
  • 2
  • +1
1 Solution
 
applekannaCommented:
Just a suggestion,

Have a alphabetic list to be chosen before you display the "from" box and then a list to dipslay the "to" box.
Hold all the records in session but display only the chosen alphabets, this way you need to go to the db again.

Even the user would like to scroll thourgh 5000 entries before he chooses one.

0
 
dualsoulCommented:
>it is the popluating the list box in the front end which is the bottleneck.
what do you mean? you populte list box on the client browser?
if not, than i think you probably do it in your servlet of jsp, or something like this. So then oyu bottleneck not populating, but the time to download so huge page with 5000+ items in listbox.
          Am i right?
if so, try to reduce number of items in listbox, like applekanna suggested.
 if not, plz explain in more details.
0
 
applekannaCommented:
typo

>Even the user would like to scroll thourgh 5000 entries before he chooses one

Even the user would NOT like to scroll thourgh 5000 entries before he chooses one
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
TimYatesCommented:
cache the lists in the servletSession, and rebuild them if the vendor lists change
0
 
jimmackCommented:
If it is a problem with the bandwidth when transferring the data to a client, consider checking the request (Accept-Encoding) to see if gzip is supported.  If it is, try piping the page through a GZIPOutputStream.  You *may* get the kind of performance increase you're looking for, but in this case there are other factors too (general network latency).

You can get some source code for this from http://www.moreservlets.com.  It's in chapter 9 (listing 9.20).
0
 
jimmackCommented:
Sorry.  I would have posted the exact link, but the site seems to be unavailable at the moment :-(
0
 
TimYatesCommented:
that comes with Tomcat ;-)
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now