FORUMS
Remove All Ads from XDA

[GUIDE]Little trick on improvimg Nexus 9 memory issue

18 posts
Thanks Meter: 33
 
By studenttwok, Junior Member on 14th October 2015, 03:23 AM
Post Reply Email Thread
Hi all,

Many of you are struggling with frequent launcher redraw issue, and me too. So I try to find out why.
That is likely cause by few reasons, including CPU power limitation (not able to handle 320ppi density screen) or not enough memory for loading high resolution assets.

Founding:
Given that Nvidia Shield Tablet, which has a similar CPU and memory volume with Nexus 9, but have a 283ppi screen.
Difference screen density may be the key to their different performances.
Android system will load hdpi instead of xhdpi assets when screen desnity is between 240 and 320.
Since hdpi assets have lower memory footprint than xhdpi assets, which the system can have more free memory for other application to run, and hence reduces the chances of redraw due to insufficiency memory.

Trade off:
Screen resolution (1536 * 2048)
Relationship between px, dp and dpi:
px = dp * (dpi / 160)

Under factory density value (dpi = 320) You have 768dp * 1024dp as logical resolution
Under a smaller density value, for example dpi = 240
You have 1024dp * 1365.3dp as logical resolution
Under a larger density value, for example dpi = 400
You have 614.4 * 819.2dp as logical resolution
Since most of the thing(text, image assets) in android are measured in dp.

TL;DR:
Lower density value > more logical resolution (dp) > "smaller and more blur text and icons" and "more working space"
Higher density value > lesser logical resolution (dp) > "larger and clearer text and icons" and "lesser working space"

For your information:
Native ppi of nexus 9 screen is 288(obtained from this formula: sqrt(1536^2 + 2048^2) / 8.9 =~287.64 )
Member @GiantAxe suggest that 316 is a good number
And I believe that any number between 280 and 319 is good. (I found it is wrong, see the update below)

Steps:
* No root access is required. Stock Rom is good to go.
1. Enable debug mode on your device.
2. On your pc/mac, switch to your adb folder.
3. adb shell wm density 316
4. Restart your Tablet and try.

Restore to origin setting:
Replace the command at step 3 with
adb shell wm density reset

Let me know if this helps!
Thanks!


[2015-10-26 update]
I am wrong!
My hypothesis on using 316 density to force Nexus 9 to load hdpi assets seems wrong.

After performing several experiments on my Nexus 9, I compose the following tables:

Code:
Official Density    | Actual Density Range   |  Assets Resolution
120                    <=131                              LDPI
160                    132 - 181                          MDPI
240                    182 - 263                          HDPI
320                    264 - 363                         XHDPI
480                    364 - 526                        XXHDPI
640                    >=527                           XXXHDPI
I write a small program to test, you can find and compile on your own here:
https://github.com/studenttwok/DPIReader

So, I set finally set my DPI to 260, in order to force Nexus 9 to load the HDPI assets instead of XXHDPI assets.
Click image for larger version

Name:	Screenshot_20151026-121620.png
Views:	2654
Size:	247.8 KB
ID:	3518899
Usually the free ram from 620MB to 720 MB, in my case.

And to reply, the performance of Nexus 9 will not increase, but the chances of application redrawn due to low memory will decrease, so you can spend less time on waiting GC and redraw to finish.


Sent from my Nexus 9 using XDA Free mobile app
The Following 28 Users Say Thank You to studenttwok For This Useful Post: [ View ] Gift studenttwok Ad-Free
 
 
14th October 2015, 03:35 AM |#2  
knitler's Avatar
Senior Member
Philadelphia
Thanks Meter: 155
 
More
Maybe this is why I've never had an issue I always run at the actual screen DPI of 288.
The Following User Says Thank You to knitler For This Useful Post: [ View ] Gift knitler Ad-Free
14th October 2015, 07:31 PM |#3  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by studenttwok

Hi all,
That is likely cause by few reasons, including CPU power limitation (not able to handle such 320ppi density screen) and not enough memory for loading high resolution assets.

Given that Nvidia Shield Tablet, which has a similar CPU and memory volume with Nexus 9, only have a 283ppi screen. Difference screen density may be the key to their different performances.

Small correction: I would note here that the Nvidia Shield Tablet uses the 32 bit version of the K1 chip, rather than the 64 bit version used in the Nexus 9. The screen resolution is also 1920x1200. The Kepler GPUs in both chips can easily handle those resolutions.
As you note , where the Nexus 9 has performance problems they are usually the result of the less than optimal amount of memory.
15th October 2015, 04:47 PM |#4  
Senior Member
Thanks Meter: 319
 
More
Quote:
Originally Posted by studenttwok

Hi all,
Many of you are suggesting from frequent launcher redraw issue.
That is likely cause by few reasons, including CPU power limitation (not able to handle such 320ppi density screen) and not enough memory for loading high resolution assets.

So I try to loader my nexus 9 screen density setting from 320 to 318.
318 is my pick and you can try any number between 280 and 319.

For your reference:
Native ppi of nexus 9 screen is 288(obtained from this formula: sqrt(1536^2 + 2048^2) / 8.9 =~287.64 )

System is expected to load the hdpi instead of xhdpi assets, and this seems improve the situation a lot.

Given that Nvidia Shield Tablet, which has a similar CPU and memory volume with Nexus 9, only have a 283ppi screen. Difference screen density may be the key to their different performances.

Steps:
1. Enable debug mode on your device.
2. On your pc/mac, switch to your adb folder.
3. adb shell wm density 318
4. Restart your Tablet and try.

Restore to origin setting:
Use
Replace the command at step 3 with
adb shell wm density reset

Let me know if this helps!
Thanks!

Sent from my Nexus 9 using XDA Free mobile app

This made things snappier for me and no lag after hrs of use, good find man. Running 318 also.
15th October 2015, 06:14 PM |#5  
Senior Member
Thanks Meter: 22
 
More
This works for my device too. Even chrome is snappier. Thank you.
15th October 2015, 09:11 PM |#6  
Senior Member
Thanks Meter: 43
 
More
@studenttwok Is there a way to confirm that the change in density actually goes into effect? I have tried the solution by setting the density to 288 but I cannot see a difference neither graphically nor in performance.
15th October 2015, 10:39 PM |#7  
dictionary's Avatar
Senior Member
Thanks Meter: 1,575
 
Donate to Me
More
Quote:
Originally Posted by billgs

@studenttwok Is there a way to confirm that the change in density actually goes into effect? I have tried the solution by setting the density to 288 but I cannot see a difference neither graphically nor in performance.

Everything gets smaller. It's impossible to not notice
The Following User Says Thank You to dictionary For This Useful Post: [ View ] Gift dictionary Ad-Free
15th October 2015, 11:49 PM |#8  
Junior Member
Thanks Meter: 1
 
More
I tried 318 but in the play store I already saw some icons that were pretty big and stretched out, didn't like it. Not terrible I guess but not sure if it's worth it for me.
16th October 2015, 04:18 AM |#9  
knitler's Avatar
Senior Member
Philadelphia
Thanks Meter: 155
 
More
Quote:
Originally Posted by Jensiehh

I tried 318 but in the play store I already saw some icons that were pretty big and stretched out, didn't like it. Not terrible I guess but not sure if it's worth it for me.

288 looks fine for me. Try that.
16th October 2015, 05:26 AM |#10  
OP Junior Member
Thanks Meter: 33
 
More
Quote:
Originally Posted by billgs

@studenttwok Is there a way to confirm that the change in density actually goes into effect? I have tried the solution by setting the density to 288 but I cannot see a difference neither graphically nor in performance.

You can use this command:
adb shell wm density

adb will show you the current density setting

The reason for me to pick 318 is it tends to 320 and try to preserve as many details as I can, and can force system to load hdpi assests instead of xhdpi. (319 is odd number and I don't' like it, personal preference)
You can try what @knitler suggests, use 288. It may look huge different in that density(everything is becoming noticeable smaller), but it may look good since image assets and font size are much more balanced.

@Jensiehh
I notice that as well, and again, personal preference matter
The Following User Says Thank You to studenttwok For This Useful Post: [ View ] Gift studenttwok Ad-Free
16th October 2015, 06:00 AM |#11  
Senior Member
Thanks Meter: 171
 
More
Quote:
Originally Posted by studenttwok

You can use this command:
adb shell wm density

adb will show you the current density setting

The reason for me to pick 318 is it tends to 320 and try to preserve as many details as I can, and can force system to load hdpi assests instead of xhdpi. (319 is odd number and I don't' like it, personal preference)
You can try what @knitler suggests, use 288. It may look huge different in that density(everything is becoming noticeable smaller), but it may look good since image assets and font size are much more balanced.

@Jensiehh
I notice that as well, and again, personal preference matter

288 is too small. You can pick the density on AICP and I got mine on 304. I'm diggin it. Increase the icon size on Nova and you're good! Thanks for the info.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes