Boryana Miloshevska
Boryana Miloshevska

Reputation: 2730

What are some performance tips when making Windows Phone 7 applications?

As performance is very important for Windows Phone 7 application development I am starting this question so that we can collect here some helpful performance tips.

General:

Performance Considerations in Applications for Windows Phone

Articles:

Performance Tips when creating WP7 apps

Performance of Windows Phone 7 Applications

Performance Considerations for Windows Phone 7 Games

Videos:

Optimizing Performance for Silverlight Windows Phone 7 Applications

Windows Phone 7 Jump Start (Session 17 of 19): Optimizing for Performance

Silverlight Firestarter 2010 - Performance Tips for Silverlight Windows Phone 7

Samples:

Creating High Performing Silverlight Applications for Windows Phone Samples

Upvotes: 21

Views: 2019

Answers (3)

FrankKrumnow
FrankKrumnow

Reputation: 508

I found this some days ago WP7 best practices - Performance

Its mostly commented links to articles (some of them mentioned before) and sources (like Jeff Wilcox Performance Progress Bar).

And remember: Listboxes are like kryptonite to WP7 performance =)

Upvotes: -1

Stan
Stan

Reputation: 746

The #1 performance enhancer I've found for my apps, especially for animations that use the UI thread, is to manually set BitmapCache for all UIElements. This significantly improves all animation.

Upvotes: 1

Lukasz Madon
Lukasz Madon

Reputation: 15004

General

  • If your app loads very fast get rid
    off the spash screen.
  • Code generation in the compact framework is not the same as Windows’ code. Jitter is optimized to run fast, not to produce the fastest code.
  • Property is just a function for .Net CF.

Silverlight

  • Take as much as you can from Compositor Thread (for callback animations use BitmapCache).
  • Use Canvas or custom popup instead of default one (Popup class) – lack of hardware acceleration.

XNA

  • Use DXT format for textures and pack them into 1 file (faster loading and fewer GPU texture switches).
  • For things like game stats avoid using strings( immutable). SpriteBatch.DrawString can take a StringBuilder directly for drawing text.
  • Avoid using/abusing LINQ and foreach (it may causes garbage). Use Jagged arrays( arrays of arrays) instead of 2d arrays.

Upvotes: 1

Related Questions