This is not a complete list, just what came to mind right now.
The important (though unfortunate) thing to take from this is that great performance doesn't come easily and there are lots of things you can (or have to) do to give your users an awesome experience.
Note that some MVVM purist may dispute some of these but they're based on real world experience.
- Get off the UI thread - Don't use it when you don't have to. Keep the UI responsive.
- Don't use value converters - They have a much greater performance impact than direct properties.
- Don't use dependency properties when you don't need to - If regular properties will work for your needs then keep it simple as they're much faster to read
- Have fewer external dependenices - Loading fewer third party libraries saves time
- Split up your assemblies - Don't load all the pages (and code) in your app when you don't need to
- Cache images (and data) - Downloading external resources takes time. Don't repeat it unnecessarily. The same goes for processing or reformatting data.
- Use a "boot loader" - If you have a large app or a complicated start up process, only have the bare minimum in the app and push everything else to separate assemblies. This will help you get as animated loading page up as quickly as possible.
- Preload/prefetch data - If you can, get the data before you need it so that when you do need it the user doesn't have to wait.
- Lazy load data - If there is a large amount of data, only load it as you need it. Don't waste time forcing your user to wait while it's all loaded.
- Reuse [data] templates (load less xaml) - Loading fewer templates is faster. Make sure you don't reload the same ones repeatedly
- Have less XAML - Don't use any more XAML than you need to. I often see slow apps which have unnecessarily complicated, nested controls when the same thing coudl have been created with fewer controls.
- Avoid nested margins - Reduce the amount of work the loyout engine has to do measuring the elements in creates.
- Don't use XAML - Yes, it's extreme but you can get better performance from a UI created in code than in XAML (you save the parsing time) This can make supporting the code and making changes harder though.
The above has helped me in the past. Hopefully it may help you too.
thanks for great ideas, really cool.
ReplyDeleteI felt pain converters can bring together with nested user controls when working on my current app.
ReplyDeleteI didn't have phone at the beginning and until running in emulator everything looked great. On phone that was a disaster :(
Andrew - Yes, nested user controls are a great way to end up with a large and complex visual tree. :)
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeletesan antonio spurs, http://www.sanantoniospursjersey.com/
ReplyDeletesalomon running shoes, http://www.salomonshoes.us.com/
golden state warriors, http://www.warriorsjersey.com/
ralph lauren,ralph lauren uk,ralph lauren outlet,ralph lauren outlet online,polo ralph lauren outlet,ralph lauren polo
minnesota vikings, http://www.minnesotavikingsjersey.us/
hermes bags, http://www.hermesbags.co.uk/
adidas outlet store, http://www.adidasoutletstore.us.com/
canada goose coats, http://www.uggbootscheap.eu.com/
michael kors outlet store, http://michaelkors.outletonlinestores.us.com/
nike air max,air max,air max 2014,nike air max 2014,air max 90,airmax,air max 95,air max 2013,nike air max 90,nike air max 2013
cheap mlb jerseys, http://www.cheapmlbjerseys.us.com/
cyber monday, http://www.blackfriday2015.in.net/
michael kors outlet,michael kors outlet online,michael kors,kors outlet,michael kors handbags,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors
moncler jackets, http://www.uggoutletstore.eu.com/
soccer jerseys,soccer jerseys wholesale,soccer jerseys cheap,soccer jerseys for sale,cheap soccer jersey,usa soccer jersey,football jerseys
canada goose outlet, http://www.canada-goosejackets.us.com/
air jordan 4 retro, http://www.airjordan4.org/
ugg uk outlet, http://www.snowboots.us.com/
air jordan 11 retro, http://www.airjordan11.net/
kkkk1013
jianbin1208
ReplyDeletemichael kors uk outlet
fred perry shirts
lebron james shoes,lebron 12,lebron 12 shoes,lebron sneakers,lebron iv,lebron 11,lebron 10
nike air max 2014
timberland outlet
adidas jeremy scott
adidas outlet store
canada goose jackets
nike air huarache,nike huarache,nike huarache sneakers,nike huarache shoes
uggs outlet
north face jackets
football shirts uk,soccer jerseys uk,cheap soccer jerseys uk
coach outlet
winter coats outlet
ray ban sale
chanel handbags
michael kors usa
louis vuitton outlet online
lebron 12
michael kors outlet online
uggs outlet
ray ban sunglasses outlet,ray ban sunglasses,ray ban,rayban,ray bans,ray ban outlet,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban
canada goose jackets
cheap mlb jerseys
uggs outlet
cheap ugg boots
winter jackets outlet
los angeles clippers
dallas cowboys