5 Tips for Reducing the Memory Footprint in a Background Task
Join the DZone community and get the full member experience.
Join For FreeI 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.
Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments