[
https://issues.apache.org/jira/browse/CB-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436199#comment-13436199
]
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 help.
I'll see how the Android team did this before any further experimentation.
> 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