Note that there are some explanatory texts on larger screens.

plurals
  1. POVery high memory consumption on Nexus 7 with Android Jelly Bean
    primarykey
    data
    text
    <p>I have an application which is quite memory consuming - handling large bitmaps. I have tuned the application using well known techniques for handling such bitmaps (please no links on tutorials in answers...) so that it runs fine without any <code>OutOfMemoryError</code> exceptions, but only on devices running HC and ICS, on Jelly Bean the same application has almost 80 % higher memory consumption, which leads to bad user experience, the app is lagging and slow.</p> <p>I prepared a simple test, just created the simplest Android application using a template in Eclipse; the app has only one activity with a background bitmap (1280 x 800). On device with Android 3.1 (Asus A500) it allocates:</p> <pre><code>01-23 12:28:02.402: D/dalvikvm(31706): GC_FOR_ALLOC freed 65K, 4% free 6559K/6787K, paused 17ms 01-23 12:28:02.402: I/dalvikvm-heap(31706): Grow heap (frag case) to 10.355MB for 4096016-byte allocation 01-23 12:28:02.432: D/dalvikvm(31706): GC_CONCURRENT freed 1K, 3% free 10558K/10823K, paused 1ms+2ms </code></pre> <p>On Nexus 7 with JellyBean 4.2.1 it allocates:</p> <pre><code>01-23 12:13:49.740: D/dalvikvm(23815): GC_FOR_ALLOC freed 84K, 4% free 7464K/7700K, paused 18ms, total 18ms 01-23 12:13:49.750: I/dalvikvm-heap(23815): Grow heap (frag case) to 11.338MB for 4096016-byte allocation 01-23 12:13:49.770: D/dalvikvm(23815): GC_FOR_ALLOC freed 1K, 3% free 11463K/11704K, paused 23ms, total 23ms 01-23 12:13:49.800: D/dalvikvm(23815): GC_CONCURRENT freed &lt;1K, 3% free 11463K/11704K, paused 2ms+2ms, total 23ms 01-23 12:13:49.900: D/dalvikvm(23815): GC_FOR_ALLOC freed &lt;1K, 3% free 11463K/11704K, paused 12ms, total 13ms 01-23 12:13:49.920: I/dalvikvm-heap(23815): Grow heap (frag case) to 18.259MB for 7259056-byte allocation 01-23 12:13:49.940: D/dalvikvm(23815): GC_FOR_ALLOC freed 0K, 2% free 18552K/18796K, paused 16ms, total 16ms 01-23 12:13:49.960: D/dalvikvm(23815): GC_CONCURRENT freed &lt;1K, 2% free 18552K/18796K, paused 3ms+2ms, total 17ms </code></pre> <p><strong>So I have two questions:</strong></p> <p>1, why the application consumes so much memory when using only one bitmap on the background of its main activity?</p> <p>2, why the device with JellyBean has almost 80 % higher memory consumption when running the same application?</p> <p><strong>EDIT1:</strong></p> <p>All devices have the same screen resolution: 1280 x 800 px</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload