views:

488

answers:

1

Hello friends,

In my project I am fetching cities using country selected.

Now I have about 8000 cities for 1 country, and because of that filteringSelect takes time to show it fast.

following are ajax functions I am using to fetch records and display it in my page.

function GetCities(){
  dojo.xhrPost({
    url: 'GetCitiesForCountry.action',
    load: getCityCallback,
    error: getCityError,
    content: {countryId: dijit.byId('cmbcountryid').value }
  });
}

function getCityCallback(data,ioArgs) {
  //alert(data);
  dijit.byId('cmbcityid').destroy();
  dojo.byId('td_city').innerHTML = data;
  dojo.parser.parse();

}

in above 'GetCitiesForCountry.action' will take countryId and will fetch all cities for that country and will create city combo and will return it.

in getCityCallback function I am placing returned combobox in its respective td using innerHTML.

This all works fine.

But when I click on dropdown button of fiteringSelect it takes about 5-6 seconds to show dropdown list.. I am not getting why?

Can anyone help me?

Is there any way to make it fast enough.

Thanks in advance.

+1  A: 

I'm using dijit.form.FilteringSelect for a drop-down menu of about 6000 items. The time taken for displaying/filtering various selections as the user types is very high.

Is there any fix or alternate option for making a typeable drop-down menu of large number of items (~6000) items.

Kan
By using 'pageSize=10' attribute I was able to improve performance on Firefox and other modern browsers. Performance on IE6 and IE7 was still very bad.
Kan
I think problem seems to be with dojo itself..thanks for you anwer.amar4kintu
amar4kintu
I would rather divide it into states and then cities. Problem solved and much more elegant in usage and its also make sense.
Adeel Ansari