In the phone run I get all the contact details. After getting all the details, I will try to sort the list according to the alphabetical order of the name. It is sorted, but it takes about 30 seconds to sort the list. How to optimize the list.
function onSuccess(contacts) { contacts = contacts.sort(cSort); } var cSort = function(a, b) { aName = a.displayName ; bName = b.displayName ; return aName < bName ? -1 : (aName == bName ? 0 : 1); };
Thanks at Advance.
user4928488
source share