Solved

List Box Popluation Speed

Posted on 2003-11-03
8
208 Views
Last Modified: 2010-04-01
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
Comment
Question by:venkatcg
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Expert Comment

by:applekanna
ID: 9676251
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
 
LVL 15

Expert Comment

by:dualsoul
ID: 9676482
>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
 
LVL 3

Expert Comment

by:applekanna
ID: 9676490
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 35

Expert Comment

by:TimYates
ID: 9677527
cache the lists in the servletSession, and rebuild them if the vendor lists change
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9677677
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
 
LVL 15

Expert Comment

by:jimmack
ID: 9677681
Sorry.  I would have posted the exact link, but the site seems to be unavailable at the moment :-(
0
 
LVL 15

Accepted Solution

by:
jimmack earned 250 total points
ID: 9679309
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9679407
that comes with Tomcat ;-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to exclude a file using regex 5 122
IE doesn't Invoke servlet in iframe 1 115
maven webservice example issue 2 144
servlet example 17 52
Some of the SEO trends we might expect in 2017.
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question