cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-402) Improve Contacts search taking a long time by using (NSArray*)filteredArrayUsingPredicate:(NSPredicate*)predicate
Date Mon, 05 May 2014 23:18:21 GMT

     [ https://issues.apache.org/jira/browse/CB-402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shazron Abdullah updated CB-402:
--------------------------------

    Component/s:     (was: iOS)
    Environment: iOS

> 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: Plugin Contacts
>         Environment: iOS
>            Reporter: Shazron Abdullah
>            Priority: Minor
>              Labels: benchmark, unit-test
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message