Tuesday, June 02, 2015

5 tips for reducing the memory footprint in a background task

I was just asked for 5 tips on reducing memory footprint in background tasks.
Here's what I came up with:

1. Include as few external dependencies as possible.
2. Include as little of your own code as possible.
3. Don't load anything in memory you don't need - and free anything you do load before carrying on.
4. Do as little as possible - stick tightly to only what you absolutely must do.
5. Don't be afraid to split functionality between multiple tasks if need be.


Yes, they're all quite generic but this is actually a fairly standard scenario on mobile. Ultimately, to save time and resources (memory, network, power, etc.) you should do as little as possible and only use the things you must.


0 comments:

Post a Comment

I get a lot of comment spam :( - moderation may take a while.