3

Information
I am trying to create a quick-to-load contacts app for the Windows Phone. The big issue I am coming across is the initial start-up time. The default peoples hub starts up rather quickly while everything I've created has taken anywhere between three and twelve seconds.

From what I can tell, there are two main ways of retrieving contact information in Windows Phone 8.1. The first, using Silverlight, would be to create a Contacts object and search. The second, using WinRT, would be to create a ContactStore from a ContactManager and find contacts.

I have attempted both methods with 420 contacts and have recorded the time (using a Stopwatch object) it to retrieve the contacts from the code below.

Data
To gather these results, I ran a Lumia 1020 in debug mode.

Contacts cons = new Contacts();
cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);
cons.SearchAsync(String.Empty, FilterKind.None, "Retrieve Contacts");

2456 milliseconds

ContactStore store = await ContactManager.RequestStoreAsync();
test = await store.FindContactsAsync();
contacts = test.ToList();

9715 milliseconds

Questions

  1. Why is the Silverlight method of retrieving contacts so much quicker than the WinRT method? What underlying components are hindering the performance for the WinRT method?

  2. Is there anything that I can do to improve the performance of either (preferably the WinRT since it appears to be the more future proof one)?

Tiago
  • 51
  • 6
  • [This question](http://stackoverflow.com/q/25603829/2681948) seems to be related. – Romasz Dec 08 '14 at 07:35
  • 1
    Could you tell us more about the app? Do you really need all contacts at the beginning (and not just some portion of them)? Can't you cache them? Also, what device/emulator are these performance measurements from? – yasen Dec 08 '14 at 10:01

0 Answers0