WP7 Perf Tip #5: Check your memory usage

Two for the price of one today! Take Aways: Make sure your memory usage is below 90MB. Always check your memory usage while you’re developing your app (preferably on device) by using the following code: long deviceTotalMemory = (long)DeviceExtendedProperties.GetValue(“DeviceTotalMemory”);long applicationCurrentMemoryUsage = (long)DeviceExtendedProperties.GetValue(“ApplicationCurrentMemoryUsage”);long applicationPeakMemoryUsage = (long)DeviceExtendedProperties.GetValue(“ApplicationPeakMemoryUsage”); Why? The Windows Phone 7 Application Certification Requirements specify (as of 28th of…

2

WP7 Perf Tip #4: Use fully qualified paths when setting the source property

File this one under “Sad, but True”… Take Away’s: Always prefix your source paths with a “/” (full-qualified path) instead of simply using relative paths. Correct: <Image Source=”/Resources/Images/Background.jpg”> Incorrect: <Image Source=”Resources/Images/Background.jpg”> But they both work!?! True, both of these will work, equally well (visually), but performance wise the relative path will do extra lookups which…

0

WP7 Perf Tip #3: Read the performance document

This is kind of obvious – but important. Read the White Paper which was written by the Silverlight performance team (mainly Shane Guillet) and browse through the samples that come with it. In these blog posts I’ll try to distill specific items from the paper into blog format, but you can’t replace the feel of…

0