Open cjrvdev opened 2 years ago
When I implemented it I was thinking about it... If the user has a lot of contacts we will have perf. issues... I can see two solutions for this:
IAsyncEnumerable
;This is the blogpost I read a few weeks ago about it: https://medium.com/swlh/the-good-the-bad-and-the-ugly-three-approaches-to-loading-contacts-in-your-android-application-c96eaf03ffaf
Im not sure if chaning the implementation is something viable but the post has some interesting approaches. Seems like not so long ago Google added Loader classes to deal with this kind of task.
Im sorry I cannot be more helpful about it
@cjrvdev thanks for the reference... Yeah, I don't know if the team wants to make the change here, since this repo is in code freeze mode. If the fix for this issue is something "simple" it can be merged here, but if we have to change the implementation I believe that we should it on MAUI
As long as we don't change/add/remove public APIs we're still open for bugfixes! Of course a contribution if this impacts you is much appreciated!
Description
When trying to retrieve the full contact list in devices with over 1000 contacts the performance is not appropiate and we observe the ANR graphs in google play console skyrocket to 3-4%. The implementation is not the recommended it seems and many stackoverflow posts talk about this topic. Also found a blog talking about "the good, the bad and the ugly" in this topic which can maybe work to improve the Essentials Library
Steps to Reproduce
Expected Behavior
Contacts load taking its time but not freeze the app.
Actual Behavior
Android show "Application XXX is not responding" prompt as if the main thread is locked.
Basic Information
PS: Thank you very much for all the work put into this library, its awesome :)