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:19:38 GMT


Braden Shepherdson commented on CB-1250:

The limit/offset approach does "work" on Android, and the round-trip time is roughly linear
in the number of contacts requested. However there are sometimes multiple rows with the same
ID so we combine them into one contact to be returned. That approach breaks with limit/offset,
making it impractical.

I also experimented with caching the getColumnIndex values instead of calling it repeatedly.
It looks like the profiler is not counting time spent waiting for responses from the data
store, because the time consumed by these Java calls does not come close to matching the wallclock
time. Even though getColumnIndex calls were supposedly 40% of the work, caching the values
and reducing from 1442*n calls to n calls made no discernible impact to the wallclock time
to fetch all the contacts.

It looks like neither approach will really improve matters, and I will have to be content
that this call is async.
> 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