locked
Poor performance of api for loading all contacts in windows phone

    Question

  • Hi

    I am a c# developer who is developing applications for windows phone 8.1 and windows 8.1 .

    Since I need to develop applications for both platform I chosen  xaml c# [for Windows phone 8.1 &windows 8.1] istead of silverlight  . So that I can easily use the same api for both windows phone and windows 8.1 .

    Now I am creating a company application and in which Need to sync our mobile contacts with server. And I used Quickstart: Selecting user contacts Windows Phone Store app using C++, C#, or Visual Basic for getting all contacts.

       ContactStore contactStore = await ContactManager.RequestStoreAsync();
        IReadOnlyList<Contact> contacts = null;
        // Find all contacts
        contacts = await contactStore.FindContactsAsync();

    But the api performance so poor compared to Silver light. It takes 40 to 50 seconds to load  1000 contacts. At the same time a silverlight app took for same is about 6 to 7 seconds.

    Also there is no option for filtering contacts in Windows 8.1. Since we don't want to take facebook and twitter contacts from the phone I need to filter those kind of contacts. Even sometimes I need to take contacts with phone numbers. This useful options are not available on this version of api even this is very fundamental.

    Why you developers is not providing this kind of facilities or performance to the app ? Now I am worried about not choosing silverlight for developing my application.


    anoop m

    Thursday, March 12, 2015 7:54 AM

All replies

  • I can confirm it!

    I wrote an universal app this week and for 50 contacts, it need up to 4 seconds (1 second for 10 contacts)!

    The entire API seems still in a beta version compared to the Silverlight API... Each time I want to develop an app, I don't know if I should use Silverlight or create an universal app with all problems the APIs has.

    After getting the contacts, you can filter them listing only "contacts.Phones.Count > 0" - for your facebook problem.

    At beginning I was thinking the filter process could be slow, but you loose your 40 seconds calling this function: "await contactStore.FindContactsAsync();"

    I am trying to find a solution too as workaround for this latency. Maybe a solution can be to find only contacts with "A*" and once they are on the screen you can find the other contacts. Another solution is to store the entire contacts in your app and synchronize them when you start your app (a very stupid solution, I know :P).

    Maybe someone who already developed something like that, can help us :D


    Thursday, March 12, 2015 8:50 AM
  • I can confirm it!

    I wrote an universal app this week and for 50 contacts, it need up to 4 seconds (1 second for 10 contacts)!

    The entire API seems still in a beta version compared to the Silverlight API... Each time I want to develop an app, I don't know if I should use Silverlight or create an universal app with all problems the APIs has.

    After getting the contacts, you can filter them listing only "contacts.Phones.Count > 0" - for your facebook problem.

    At beginning I was thinking the filter process could be slow, but you loose your 40 seconds calling this function: "await contactStore.FindContactsAsync();"

    I am trying to find a solution too as workaround for this latency. Maybe a solution can be to find only contacts with "A*" and once they are on the screen you can find the other contacts. Another solution is to store the entire contacts in your app and synchronize them when you start your app (a very stupid solution, I know :P).

    Maybe someone who already developed something like that, can help us :D


    Mine is a whatsapp like application. In my case filtering contacts in alphabetical order is not possible because I need to get all contacts with mobile numbers and need to send it to server for syncing. 

    If it s just for displaying , your solution is correct. But now it is not.  I thought we can create both windows phone and windows 8.1 apps with one core api , I didn't know their defects or performance problems at the starting stage of development.


    Thursday, March 12, 2015 9:36 AM
  • Proposed as answer by                             Herro wong<abbr class="affil">Microsoft contingent staff, Moderator</abbr>                         7 hours 20 minutes ago


    What??????????????????

    It wan't the answer to the question!!!!!!

    He answered to my post.

    I am still waiting to a real answer too!

    Whats kind of behavior is it, to mark every question as answer? Only to let think other users, the problem was solved?



    Tuesday, March 24, 2015 9:14 AM
  • I have the same problem and find more about it. That API are different between silverlight and runtime. The runtime API retrieve the whole information of mobile contacts, but the silverlight version just retrieve some basic ones. So you feel poor performance of the runtime version.

    In this case, if you want to work around this problem, remove await keyword, let FindContactAsync method work in background, and provide a progressbar control to show the progress.

    Thursday, March 26, 2015 3:35 AM
  • Hi Nithak,

    How it will effect removing await keyword from the function ?

    What are the benefit of doing it ?


    anoop m

    Thursday, March 26, 2015 5:08 AM