[ https://issues.apache.org/jira/browse/CB-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13550516#comment-13550516 ]
Benjamin Hill commented on CB-402: ---------------------------------- v2.3.0: Have a few minute wait time when returning results against a ~2000 entry address book, and searching on all fields/all results. > Improve Contacts search taking a long time by using > (NSArray*)filteredArrayUsingPredicate:(NSPredicate*)predicate > ----------------------------------------------------------------------------------------------------------------- > > Key: CB-402 > URL: https://issues.apache.org/jira/browse/CB-402 > Project: Apache Cordova > Issue Type: Improvement > Components: iOS > Reporter: Shazron Abdullah > Priority: Minor > Labels: benchmark, unit-test > Fix For: 2.4.0 > > > We have to analyze this first to see if it is a big problem, with a huge N. I > believe it is. > Right now our search method is O( n ), while using Apple's search method it > is possibly O( log n ) - but that's just a guess if I assume internally they > use a binary search. > Steps: > 1. Grab all the contacts in a NSArray through > ABAddressBookCopyArrayOfAllPeople > 2. Construct a NSPredicate for the filter, and call > filteredArrayUsingPredicate on the NSArray returned in step 1. > 3. Convert the NSArray returned in step 2. to our CDVContact objects -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira