Category Archives: WinRT

Analyzing WinRT App startup time

This article is based on the awesome presentation Kiran Kumar had at Build.

One of the topics he discussed about, which I found very interesting, was the way you can use xperf to analyze the startup time of your WinRT apps.

Here is what you need to do for capturing startup events:

  1. Get Windows ADK from here
  2. Get the script for controlling the profile from here
  3. Run the script (as Administrator). It will start the profiler and will wait for a keystroke before stopping it.
  4. Exercise your WinRT app. Make sure the app was closed before you run it so that you capture the startup events.
  5. Hit any key on your script window which will stop the profile and generate several .etl files.

Analyzing the startup events:

  1. Double click to open the generated xaml_merged.etl with Windows Performance Analyzer
  2. In Graph Explorer expand the System Activity

    WPA: System Activity

  3. In System Activity locate Generic Events and drag it into the empty canvas on the right.

    WPA: Generic Events

  4. Close Graph Explorer and click on the Display graph and table icon on Generic Events

    WPA: Display graph and table

  5. Expand Microsoft-Windows-Immersive-Shell and locate AppShown event

    WPA: Finding AppShown event

  6. Notice that when you select the AppShown event, an area of the graph is highlighted. Right-click it and select Zoom
  7. Expand Microsoft-Windows-XAML and locate ParseXaml event

    WPA: Finding ParseXaml event

  8. Now you should be able to observe all events that might impact your startup time. You can also observe the total startup duration at the bottom of the window

    WPA: Xaml resources loaded during startup

Make sure to get rid of any unneeded resources you might be loading so that you load only the bare minimum you need on the first page of your app. Keep in mind that your users might be running your app on less powerful hardware than your development machine.

I strongly recommend watching Kiran’s presentation for more interesting facts and best practice for optimizing the performance of your WinRT apps.

One more thing 🙂

I found this technique extremely useful while I was working on my Win8 app Puzzle Frenzy.

The app is available in Windows Store, check it out and tell me what you think:

You can also give your feedback on app’s review page or on app’s Facebook page

Happy codding!

Puzzle Frenzy home page

Puzzle Frenzy home page

Puzzle Frenzy Windows 8 app has been released!!!

Hi everyone,

I am pleased to announce that the Puzzle Frenzy app has been release in Windows Store!

Puzzle Frenzy is a realistic jigsaw puzzle game which features over 70 hand-picked images, ideal for puzzle solving.

The game contains several difficulty levels ranging from 16 to 100 pieces.

During the game you can shuffle or sort the pieces and also get hints in case you get stuck.

You can download the app from here:

Puzzle Frenzy home page

Puzzle Frenzy home page

Puzzle Frenzy gameplay in fast forward:

If you have any comments or suggestions check out our  Facebook page or drop us an email at

The page contains details about the game, the story behind some of the images as well as news and updates.

You can also follow us on Twitter  or on Google+

I’m looking forward to your feedback and I hope you enjoy the game!

All the best!

Building Puzzle Frenzy: realistic puzzle pieces

Puzzle Frenzy was built on top of a previous app I wrote for WP7. At that time the app was more simple and the gameplay more limited. The images used, the pieces shape and the difficulty levels were different as well.

For Puzzle Frenzy one of the first things I changed was the puzzle pieces shape.

A great deal of attention was dedicated into making them as familiar to the user as possible.

The WP7 app was using a simple rectangle and four ellipses as connectors for drawing puzzle pieces.

Now I use a Bézier curve with 10 control points for each edge of the piece.

Therefore each Puzzle Frenzy piece is a Bézier curve with 40 control points.