WP8.1 Getting Contact Information - Performance Issues

Info
I am trying to create a fast contact download application for Windows Phone. The big problem I'm having is the initial startup time. Concentration of people starts up pretty quickly by default, and everything I've created takes between three and twelve seconds.

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

I tried both methods with 420 contacts and recorded the time (using a stopwatch object) to retrieve contacts from the code below.

Data
To collect these results, I ran the 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

  • Why is the Silverlight method for finding contacts so much faster than the WinRT method? What are the main components hindering performance for the WinRT method?

  • Is there anything I can do to improve performance either (WinRT is preferred, since that seems to be more promising proof)?

+3


source to share





All Articles