Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Drop down with 10000 elements  RSS feed

 
Dinesh Bang
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

I am making a struts based application, where in I need a drop down with 10000 entries. The page is taking 3-4 sec for display. Morover , such drop down will be comming one per each row, as per user keeps addign the rows. So pages are taking really high time of 3-4 sec to display.

Any sugegstions how to kill this performance eating bug?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A dropdown with 10000 entries is a terrible user experience. I'd think about ways how to keep the dropdown to 100 entries at the most, possibly using a two-levelled approach (one dropdown with 100 entries to select at the first level, and once that's done, populate another dropdown with 100 entries that go with whatever the user selected in the first level).
 
Dinesh Bang
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeh, I am might require to use pagination , as mentioned by you.
But I was looking if I can get anythign like caching . Or some thing of that sort. But as its not image , I doubg if I can cache it. The list although will mostly remain constant.

One more clarification, it won't be a perfect drop dowm. It would be check boxes , within a scrollable area. So user can select as many items as he wants to.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree completely with Ulf that a drop down/scrollable area will put a user off completely and rather than solving the performance issue you must look at redesigning the UI.

However, if you can not, then, here are my 2 cents.

Firstly, you have to find out as to which part of your processing is taking time.
Is it the rendering of the page that is taking time or is it the data retrieval that is taking time.
If it is rendering then you need to use pagination.
If it is data retrieval then you must use caching.

Dinesh:
But as its not image , I doubg if I can cache it.

What???

Dinesh:
The list although will mostly remain constant.

Then you can put the list in your HTTP session when the application is loaded. This can be called as "cache".
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would take a lot more time than 3-4 seconds to display a page like that if I was to access that page from where I am.

But, to concur with Ulf, I'd only do it once. Assuming that that much content didn't crash my browser and I didn't go blind just reading the list, the act of attempting to scroll through that many entries would drive me insane.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to think like a user - how would you REALLY like to find that data instead of paging through a list.

Surely there is some sort of organization/preliminary selection you can do first.

Bill
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What the data is about? and what you are thinking to do?
Are you providing the user to choose an option from a thousand number list!!! I dont think so, it cant be choice, it can only be search.
 
Dinesh Bang
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well Ranchers.. we have changed our UI design.. So now we are not gonna give him a list , but a search pop-up. So the list will be smaller then expected.

I know the previous approach was not from user point of view. So we a rework on it .
Anyways, thanks much for replies.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dinesh:
So now we are not gonna give him a list , but a search pop-up. So the list will be smaller then expected.


May god bless you. You saved people from getting DDP (Drop down phobia)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!