Home > DeveloperSection > Forums > Launch time in Windows Phone 7
Samuel Fernandes
Samuel Fernandes

Total Post:155

Posted on    April-07-2015 7:59 AM

 .NET Windows Phone 

 1 Reply(s)
 466  View(s)
Rate this:
How i can reduce my launch time in windows phone, What all are the constraints that affects application launch time. While running Market place test kit sometimes it passes the launch time result and some time it fails; Actually i am struggling to identify the place it fails, How i can identify the place issue occurs, I try with performance analysis tool but doesn’t find any solution. And also another doubt regarding with this load time is that, how this load time is calculating wthr it is related to the loading of first page, or it checks the entire pages in the app. How i can reduce this load time.....

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    April-07-2015 8:07 AM

Find out where is the load time spent. The technique is fairly easy:

public partial class MyPage : PhoneApplicationPage
    int m_t0;

    public MyPage() {
        m_t0 = Environment.TickCount;
        MyListBox.Loaded += MyListBox_Loaded;

    void MyListBox_Loaded(object sender, RoutedEventArgs e) {
        Debug.WriteLine("\n---------> {0} msec", Environment.TickCount - m_t0);

Above code measures the time between the page construction and the instant when the listbox is loaded. This is the tool you can apply everywhere.

You could start in App.xaml.cs - it contains several interesting entries such as the constructor and app-level events, then go on to the page level and eventually measure interesting controls. If you want to measure xaml loading, measure the time spent in InitializeComponent() (debug this method - it is rather instructive) etc, etc.

It helps if you understand app life cycle, page and control loading.

At the end you should have a fairly good idea where is the time spent. Then you can start optimizing and eventually employ the techniques described by Ku6opr. You can get a lot more tips if you google for say "windows phone 7 performance".

Don't want to miss updates? Please click the below button!

Follow MindStick