title: Android ConstraintLayout performance improvements - Missing in action
body: <p>I have created a custom view and inserted logging for an estimated performance comparison</p>
  
  <pre><code>public class CustomInAppKeyboard extends LinearLayoutCompat  {
  
      private static final String TAG = "MyKeyboard";
  
      @Override
      protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
          super.onMeasure(widthMeasureSpec, heightMeasureSpec);
  
          if(BuildConfig.DEBUG){
              Log.e("CustomInAppKeyboard", "w:" + widthMeasureSpec + " :: " +  MeasureSpec.toString(widthMeasureSpec));
              Log.e("CustomInAppKeyboard", "h:" + heightMeasureSpec + " :: "  + MeasureSpec.toString(heightMeasureSpec));
          }
  
      }
  
      public CustomInAppKeyboard(Context context) {
          this(context, null, 0);
      }
  
      public CustomInAppKeyboard(Context context, AttributeSet attrs) {
          this(context, attrs, 0);
      }
  
      public CustomInAppKeyboard(Context context, AttributeSet attrs, int defStyleAttr) {
          super(context, attrs, defStyleAttr);
          init(context, attrs);
      }
      private void init(Context context, AttributeSet attrs) {
  
          LayoutInflater.from(context).inflate(R.layout.keyboard_alphanumeric, this, true);
      }
  
  }
  </code></pre>
  
  <p>then using start &amp; end times of "MyKeyboard" logs... I end up with the following values:</p>
  
  <ul>
  <li>ConstraintLayout withguides 14.32</li>
  <li>ConstraintLayout with chains 13.62   </li>
  <li>LinearLayout (nested weights) 4.88</li>
  </ul>
  
  <p>That was based on these xml layouts files in the following gist:
    - <a href="https://gist.github.com/CrandellWS/fc7946ea653cf90828580b3c00d8da57" rel="nofollow noreferrer">https://gist.github.com/CrandellWS/fc7946ea653cf90828580b3c00d8da57</a></p>
  
  <p>So how can I get the ConstraintLayout to render as fast as the nested LinearLayout? What could I do differently or change to get the ConstraintLayout to more closely match the LinearLayout performance?</p>
  
  <p><a href="https://source.android.com/devices/input/key-layout-files" rel="nofollow noreferrer">"actual" Keyboard layout files are known to be different</a></p>
  
  <p>Note that there is an inability to use Systrace on my physical device <a href="https://stackoverflow.com/a/52836747/1815624">https://stackoverflow.com/a/52836747/1815624</a> ... hence the rudimentary performance test method... </p>