The Themer Blog


How Themer Manages RAM on Your Phone

Dec 06 2013 | 08:32 PM



This post is a bit more technical than others we've posted here to our blog. Some advanced users have noted sometimes Themer utilizes 100MB of RAM or more. We wanted to explain why that appears to be the case and how Themer utilizes the memory on your phone.


Today, phones have amazing HD displays which have resolutions equal to or higher than most 24" desktop monitors. The biggest memory hog in most Android apps is the use of high quality images. Themer uses a completely custom wallpaper system, which allows us to include features like the different wallpaper modes (multi, static, scrolling) and support custom transitions (fade, slide). Depending on the wallpaper mode, we need to keep up to three images in memory at all times (current homescreen, and the immediate left and right). These images, when converted to bitmaps, occupy about 10MB each.


Then, there is Themer's built-in theme browser, which lets you swipe through all the available themes. Once you find one you like, tapping on it will open a full-screen preview. We use the excellent library 'Android-Universal-Image-Loader' (UIL) by nostra13 to handle the thumbnails and preview images. Since we want the user experience to be fast and fluid, we allow the UIL to use significant amounts of additional memory while browsing the theme gallery. 


When the user exits the theme browser, Themer will completely give up all this memory. The rest of the memory is now free to be used by any other app, though it will remain allocated to Themer and shows up that way in the RAM manager. As soon as you open another app that needs a lot of memory (like a game or several memory-intensive apps), this memory will be allocated away from Themer. As a result, Themer has a reasonable MAXIMUM operating memory requirement of ~60-80MB, depending on the device's screen resolution. Unfortunately an app cannot de-allocate memory by itself.  Even though Android's RAM manager might show that Themer is using up to 200MB of memory, it is most definitely not using this much to operate. 



comments powered by Disqus