incubator-callback-dev mailing list archives

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


Braden Shepherdson commented on CB-1250:

I'm currently pulling the Android source code. I'll take a look at how the stock ICS and/or
JB Contacts app retrieves the user's contacts so quickly. Maybe we're doing something wrong,
maybe there's a new, faster API. I can hope.

I'm not sure how much of the time taken is spent allocating and GCing the big set of JSON*
objects. I wonder if the big JSONArray of all the contacts is being forced to copy itself
multiple times? We could try a pre-sized (with c.getCount()) ArrayList<JSONObject> and
use the JSONArray constructor that takes a collection, but it's not clear whether that would

I'll see how the Android team did this before any further experimentation.
> Speed up fetching of contacts on Android
> ----------------------------------------
>                 Key: CB-1250
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message