- Limit object creation and references. The more objects your application creates, the more that has to manage. One suggestion is to use stack based variables instead of heap based member or object instances , especially when they are referenced numerous times. For example, if I have an object variable that I reference numerous times in a for loop, copy it to a local variable and use that instead in your loop.
- Limit data packet size and processing. If your mobile app depends on data from an external source, try to retrieve it in as small packets as possible, and if the data can be pre-processed on the server before transmitting to the mobile app, take advantage of it. Also, if a packet is lost, it's easier to re-send a smaller packet, as opposed to a larger one encompassing all the data. These are practices we strived for in SportsFlash.
- Utilize PowerManagement to power down the application when not in use.
- Use threading to ensure that complex tasks, if they fail, don't crash the rest of your application.
Tuesday, July 29, 2008
How do I code for Performance, Memory, ... etc in Mobile Apps
The following are just a list of running rules I'm comprising to help in developing mobile apps:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment