[AC-3585] Android: Ti.Contacts.getAllPeople() has noticeably slow performance
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2016-05-10T17:40:27.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | n/a |
| Reporter | Kiley Williams |
| Assignee | Shak Hossain |
| Created | 2016-05-03T01:14:49.000+0000 |
| Updated | 2018-11-11T12:04:47.000+0000 |
I suspect the performance issue on Android >= 6 devices might have to do with what is breaking for Android < 6 devices.
Hello, I am able to reproduce this issue with given code and given step. Android device takes almost 7 seconds to process a contact list of 3,000 contacts on the device for the command
Ti.Contacts.getAllPeople(). *Steps:* 1. Create a dummy csv file of contacts from this [link](http://www.convertcsv.com/generate-test-data.htm). 2. Import the contact list on Android device. 3. Create a default classic project with following code.4. Build and run the app on android device. 5. Click the label. >> In console log it comes "starting to take contacts" and after almost 7 seconds comes the log "Done". Thanks *Environment*: *Device info:* HTC One (Android 4.4.3) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.2.GA and 5.2.1.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5 *Appcelerator CLI Version:* 5.2.2 *Appcelerator Studio:* 4.5.0var win1=Titanium.UI.createWindow({ title:'Tab 1',backgroundColor:'#fff' }); var label=Ti.UI.createLabel({ color:'blue',text:'Get Contacts',top:30,width:300,height:200 }); win1.add(label); win1.open(); label.addEventListener("click", function(e) { var contactsAuthorizationValue=Ti.Contacts.getContactsAuthorization(); if(contactsAuthorizationValue===Ti.Contacts.AUTHORIZATION_AUTHORIZED) { Ti.API.log("starting to take contacts"); var rawContacts=Ti.Contacts.getAllPeople(); Ti.API.log("Done"); } });Hi, the problem is still here on SDK 7.4.x and 7.5.x, Ti.Contacts.getAllPeople() take more than 7 seconde to read 4000 contacts Any workaround to fix the bug Thank's
is not a duplicate TIMOB-20279, its a problème of latency