title: Nougat is much slower when compared to marshmallow
body: <p>I've been making an android game and I noticed that it runs more than twice as slow on Nougat than on Marshmallow.  In fact I figured out that between any two points in my code it seems to have roughly the same increase in time.</p>
  
  <p>So I made a test application that, when the back button is pressed, does a test but I got roughly the same result again (code is below).  I tested this using two android virtual devices(see the code for an average time in ms that was recorded) but I initially noticed it because my tablet got updated to nougat so it isn't AVD specific.</p>
  
  <p>I'm stumped as to what is causing this.  Some ideas I've had are the following:</p>
  
  <ul>
  <li>The compiler isn't optimizated for nougat (api min is 15 and target is 25 and I'm building with sdk tools 25.0.2).  Seems unlikely to me since it would be a pretty widespread issue that google would immediately fix.</li>
  <li>The OS is using more resources and thus there are less left over for my game.  Unlikely since this shouldn't account for a 2X decrease in speed.</li>
  <li>The OS is added in a smaller limit for CPU usage.  Maybe I have to request to be high priority or something alike however I'd expected clear documentation so also unlikely.</li>
  <li>Android studio's settings for me aren't optimal.  This one seems the most likely to me but I can't find anything that helps me yet.</li>
  </ul>
  
  <p>Any insights or reproductions are appreciated!  Thanks.</p>
  
  <p>MainActivity</p>
  
  <pre><code>package com.example.nickgkg.test;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.widget.TextView;
  public class MainActivity extends AppCompatActivity{
    TextView text;
    long time = 0;
    @Override
    protected void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      text = (TextView)this.findViewById(R.id.text);
    }
    @Override
    public void onBackPressed(){
      //API 24(nougat) vs API 23(marshmallow)
      //API 25 performs the same as API 24 so I didn't include it
      long t=System.nanoTime();
      if(false){//Toggle this to change the test
        float garbage;
        for(int i=0;i&lt;100000000;i++)
          garbage=i*27/2200f;
        //API 24:710ms vs API 23:620ms
      }else{
        for(int i=0;i&lt;1000000;i++)
          something();
        //API 24:320ms vs API 23:120ms
      }
      time=System.nanoTime() - t;
      text.setText(time/1000000f+"ms");
    }
    private void something(){
      //BLANK function call
    }
  }
  </code></pre>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/activity_main"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.example.nickgkg.test.MainActivity"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Hello World!"
          android:id="@+id/text"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>