I am trying to populate a listbox using ajax request.
Everything works fine for me. I usded below javsscript code for the same.

var xmlDoc = xmlhttp.responseXML;
              for (var i = 0; i < xmlDoc.getElementsByTagName("id").length; i++) {
                        traderlists.add(new Option(xmlDoc.getElementsByTagName("name")[i].childNodes[0].nodeValue, xmlDoc.getElementsByTagName("id")[i].childNodes[0].nodeValue));
But the issue i am facing is there will be sometime around 10,000 nodes returing from ajax request and its taking too much time to populate the listbox becuase of the for loop.

Can anyone suggest me for more effective way.