[Nexus 6  General] Tripsyk:
Professional app developer by trade here to give what feedback on what I've found in developing my own apps.

From one app that I'm developing (personal, not related to work), I use my N6, which is my daily phone, to test it on as the time frame I'm releasing it in is when QHD phones will be mainstream. When I was designing my navigation drawer, I noticed that I had considerable stutter on opening the drawer, and slightly less when closing it, but it was still very noticeable to a developer's eyes and also probably a user. I spent about 12 hours researching why this was happening through forums. No luck. So I decided to take the slightly more tedious route and do some dev tool testing.

There's an option to enable what is called 'Profile GPU rendering' in dev options. This option shows an overlay of bars on your screen that give you some pretty useful information about what your phone is doing in real time. There's 3 main categories - Execute, Process, and Draw. Execute is the time it takes to send a frame to the compositor. This was at a level that was expected.

Then I moved on to process. Process is the amount of time it takes for the ANDROID 2D renderer to execute what it needs to and handle everything after execute, and now prep the information to be drawn by the canvas.

Draw is the amount of time it takes JAVA to build the display and complete the draw (most common this is performing View.onDraw() actions).

I noticed that the Draw was slightly high, but that was understandable given that my navigation drawer had some images that were dynamically sized. The process section of the bar however was way, way, way higher than it should have been. Normally this is effected by how efficient you build your layouts that are displayed to the user, but mine was as basic as I could possibly get it and should not have taken anywhere near that long to perform the process part of the cycle.

So then I tested my app on my old nexus 5. Guess what? Perfectly fluid 60FPS the entire time. What this leads me to believe is that it has something to do with ANDROID'S (note the bolds in the above section) ability to render and prep visuals. There's a couple things I can think of being a contributor to this:

1. Android is still very much in its infancy with 64-bit architecture. Google may not have been fully able to optimize the new renderer in 5.0 by launch to take advantage of 64-bit chips. This is a relatively easy but time consuming fix. Google engineers just need to sit down and work on it. If this is the issue, time will fix it (Google always does very clean optimizations in version X.1 of an OS release).

2. There is something wrong/not optimized with the section of the chip that is responsible for handling UI elements that are non-GPU handled. A phone passes off some of the burden of rendering to the CPU and it receives its own dedicated thread on the CPU. This thread - this area of the CPU - might not be fully baked on stock android yet. There are other phones running this chip, so I don't think it's an issue of the chip. Again, this could be fixed given time.

3. Read/Write issues. There was a big with this with the whole encryption debacle that was unearthed. Now the theories are memory being poor brand, low quality, etc. This is possible and easily able to be seen if someone who has some hardware expertise wants to do some digging to see exactly what they used. If it's taking abnormally long to prep the rendering of 2D images, it might be because Android is taking a while to read/write from the disk. Not sure how we could test this #3 theory.

I'm going to go do a few day test run and turn off the Force 2D rendering option in dev options to see if that changes anything. There is clearly an issue with 2D rendering. Whether it's an Android overall problem, an ART problem, a memory brand problem, an optimization problem, whatever - that is clearly the issue (from what I've tested). This would explain why there is significant lag in games as well (Android builds the 3d environment, then typically uses the 2D renderer to skin them. Not a game dev, so don't quote me on that - but being equipped with a pretty good knowledge of how Android works, this is how I think it's done). So if a game dev wants to test this theory out that would probably help us out a ton.

I'll post back in a few days and see what I find out by disabling Force 2D rendering.

Hope we can get to the bottom of this.