GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-12-14T22:20:55.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 2.0.0, Release 1.8.1, Release 1.8.2 |
Fix Version/s | Release 3.1.0, 2012 Sprint 25, 2012 Sprint 25 API |
Components | Android |
Labels | SupportTeam, api, insight |
Reporter | Nikhil Sharma |
Assignee | Karl Rowley |
Created | 2012-04-12T16:32:34.000+0000 |
Updated | 2017-03-22T00:10:35.000+0000 |
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)
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.
Closing ticket as fixed.