title: Is Androids new Jack compiler really that slow?
body: <p>On some of my Android projects I see that building got quite slow since using the new Jack compiler. I need it to use Java 8 features like lambdas.</p>
  
  <p>But the long building time is a bit disturbing. So I set up a new Android project. It contains just a <code>MainActivity</code> with one button which reacts on your click.</p>
  
  <pre><code>package de.xappo.myapplication;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.Toast;
  
  public class MainActivity extends AppCompatActivity {
  
      Button button;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          button = (Button) findViewById(R.id.button);
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(final View view) {
                  Toast.makeText(MainActivity.this, "Button clicked!", Toast.LENGTH_LONG).show();
              }
          });
      }
  }
  </code></pre>
  
  <p>There is nothing else except from the layout file which just contains a a <code>TextView</code> and a <code>Button</code> within a <code>RelativeLayout</code>.</p>
  
  <p><a href="https://i.stack.imgur.com/K9T9x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/K9T9x.png" alt="Profiling gradle buidling"></a></p>
  
  <p>As you can see in the picture all the jack gradle tasks together take about 75 seconds. Is this normal? This hole example app builds in less than 22 seconds without jack. So is this big difference normal?</p>
  
  <p>I already managed Java heap size within my <code>gradle.properties</code> file:</p>
  
  <pre><code>org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
  </code></pre>
  
  <p>Is there still any thing to do to improve jack compiling performance? Or do you know about any updates planned on jack to improve building time?</p>