incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Braden Shepherdson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-1250) Speed up fetching of contacts on Android
Date Thu, 16 Aug 2012 17:41:38 GMT

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

Braden Shepherdson commented on CB-1250:
----------------------------------------

>From my measurements on my Galaxy Nexus with Jelly Bean and 1442 contacts, I have the
following timings (repeated with small variance over 3 runs):

1. Javascript -> ContactAccessor's search: more or less instant.
2. Constructing the query data, WHERE clause, etc.: 1.25s
3. query() to retrieve the cursor: 2.5s
4. Populating the list of contacts: 35.8s
5. Java -> Javascript with the result: 3.5s

Many GC calls are done during steps 4 and 5, but the total time taken for GC is around 200ms.

Using Debug.startMethodTracing() and Traceview, 40% of the time is being spent in getColumnIndex,
16% in moveToNext(). The rest is too scattered to really target. However, neither of those
functions are ones we can really avoid calling. Calls to getColumnIndex are not being made
unnecessarily so far as I can see. I just have a lot of contacts.

There doesn't appear to be any low-hanging fruit here to speed things up.

The limit/offset approach looks like it will work, since those SQL(ish) clauses can be appended
to the sortOrder field. I'm looking into that further.
                
> Speed up fetching of contacts on Android
> ----------------------------------------
>
>                 Key: CB-1250
>                 URL: https://issues.apache.org/jira/browse/CB-1250
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Braden Shepherdson
>            Assignee: Joe Bowser
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Fetching all contacts on Android takes a long time when the user has many contacts (I
have ~1450 and it takes 20-30 seconds). The Contacts app can load in less than a second, so
what are we doing that's causing it to slow down?
> As an alternative or additional enhancement, add "limit" and "offset" functionality to
the ContactFindOptions, to retrieve smaller subsets of the contacts more quickly.

--
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