I have 10,000 contacts. When i try to load contacts, it takes too much time plus very slow performance. Is there any work around to load contacts asynchronously or something else ?
Any help would be highly appreciated.
I have 10,000 contacts. When i try to load contacts, it takes too much time plus very slow performance. Is there any work around to load contacts asynchronously or something else ?
Any help would be highly appreciated.
Hi, I believe there were plenty of discussion about this issue on this forum.
But here are some options:
http://ionicframework.com/docs/api/directive/collectionRepeat/
http://ionicframework.com/docs/api/directive/ionInfiniteScroll/
combination with track by id if using ng-repeat and limitto to limit how many items item you load should give you a better performance.
That resolves the rendering problem. I have 10,000+ contacts in my device, which takes long to return from plugin. I am not having rendering issue. Contacts plugin is responding too late.
Can you not request them in parts like first 100 then the next 100
How can i do that? That would be great if you can share some code.
Well, i wrote a new plugin to fix my issue. Not a very good one, but it solves my problem.
Unfortunately I have to support Android as well as ios, so @mrameezraja plugin will not work for me.
I am running into same issue except that on Galaxy s1, 4.2.2 it takes about 24 seconds to load 700 contacts. However some of my users are not able to load any contacts it just hangs and never hides loading indicator. I was wondering if anyone saw a weird contact character or missing field that would cause the process of loading contacts to brake? Also the error callback is never called.
I’m having this issue as well. Contacts load instantly on iOS but take 8 seconds on my Nexus 5 with maybe 500 contacts. I’m worried this will be even longer on worse hardware or for more contacts.
Rendering isn’t an issue, I put timings in and the time is all spent actually retrieving the contacts in the $cordovaContacts.find call.
It must be possible to improve this somehow because I tested this app:
Which appears to use Ionic and loads the contacts instantly on the same device.
I’m just doing a simple find:
var options = {};
options.multiple = true;
$cordovaContacts.find(options).then(onSuccess, onError).finally(function () {
$scope.isloadingSpinnerVisible = false;
});
There’s no problem to asynchronously load contacts with the official plugin. Creating a simple service that returns a promise solves the problem.
The strategy we use to load contacts is the next one:
Hope it helps you.
hi @jonmikelm,
could you show us the example code in “ContactsService” and an example code when we call the “ContactsService.getConatcts” ?
I need that code because i still dont get how to do it.
Thanks in advance.
Hi , Your problem (loading 10000 contacts) has solved or not?
Hi guys, any update on this. I am using cordova contacts plugin which has only 3 methods - create,find & pickContact. And its freezing UI in IOS.