Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8708] Android: Loading a large list of contacts w/ photos is slow

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-12-14T22:20:55.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.0.0, Release 1.8.1, Release 1.8.2
Fix Version/sRelease 3.1.0, 2012 Sprint 25, 2012 Sprint 25 API
ComponentsAndroid
LabelsSupportTeam, api, insight
ReporterNikhil Sharma
AssigneeKarl Rowley
Created2012-04-12T16:32:34.000+0000
Updated2017-03-22T00:10:35.000+0000

Description

It takes long to load contacts with images from the phone book. If I remove the imageView from the row the contacts (with no image) loads faster. It slows down the application incase the contacts are large in number. I've tested it for 20 contacts. Loading contacts with image takes 1 second (1000 milliseconds) and without image it takes 300 milliseconds

Repo Steps

1. Run the attached app.js file. 2. Check the DDMS for the timer values. 3. Comment the imageView . 4. Run the app again and check the DDMS for the timer values (without image)

Attachments

FileDateSize
app.js2012-04-12T16:32:34.000+00002122

Comments

  1. Karl Rowley 2012-12-07

    Pull request https://github.com/appcelerator/titanium_mobile/pull/3557 The expensive part of loading the contents was calling compress() to output the images as PNG files. With the change here, the images are now output as JPEG files. It's quite likely that the images from the database are in JPEG format, and it makes sense that it would be expensive to convert those images to PNG. My test case has 121 contacts with photos. Prior to the change it took 15.6 seconds to load, after the change it loads in 3.6 seconds.
  2. Lee Morris 2017-03-22

    Closing ticket as fixed.

JSON Source