incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-402) Improve Contacts search taking a long time by using (NSArray*)filteredArrayUsingPredicate:(NSPredicate*)predicate
Date Wed, 28 Mar 2012 20:47:31 GMT

    [ https://issues.apache.org/jira/browse/CB-402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240718#comment-13240718
] 

Shazron Abdullah commented on CB-402:
-------------------------------------

We'll have to do some quick proof of concept tests to see if it covers the breadth of our
requirements, but on a cursory search on the Internet, I found some examples:
https://github.com/erica/ABContactHelper/blob/master/ABContactsHelper.m#L101

But I won't even proceed with this if our benchmarks don't show a significant (more than 10%?
dunno) improvement for tests that demonstrate the problem.
                
> 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 Callback
>          Issue Type: Improvement
>          Components: iOS
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message