title: Recyclerview very slow to load
body: <p>I have a recycler view in an Activity where sometimes I show a lot of elements. The problem is that when the number of elements is very high the recycler view needs some seconds to render the elements and it's frustrating. I wonder why.<br>
  <strong>My code:</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/_container"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="cct.appload.fragments.FileManagerFragment"&gt;
  
      &lt;LinearLayout
          android:id="@+id/linearLayout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"&gt;
  
          &lt;android.support.constraint.ConstraintLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:focusableInTouchMode="true"&gt;
  
              &lt;Spinner
                  android:id="@+id/_order_spinner"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="8dp"
                  android:layout_marginTop="8dp"
                  android:contentDescription="@string/back"
                  android:src="@drawable/ic_arrow_back_black_24dp"
                  app:layout_constraintBottom_toBottomOf="parent"
                  app:layout_constraintStart_toStartOf="parent"
                  app:layout_constraintTop_toTopOf="parent" /&gt;
  
          &lt;/android.support.constraint.ConstraintLayout&gt;
  
  
          &lt;android.support.v7.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
              android:id="@+id/card_view"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginBottom="8dp"
              android:layout_marginTop="8dp"
              android:elevation="1dp"
              card_view:cardCornerRadius="0dp"
              card_view:cardElevation="2dp"&gt;
  
              &lt;TextView
                  android:id="@+id/_msg"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_margin="16dp"
                  android:gravity="center"
                  android:visibility="invisible" /&gt;
  
              &lt;ProgressBar
                  android:id="@+id/manager_progress_bar"
                  android:layout_width="100dp"
                  android:layout_height="100dp"
                  android:layout_gravity="center"
                  android:progressTint="@color/colorAccent"
                  android:visibility="invisible" /&gt;
  
              &lt;android.support.v7.widget.RecyclerView
                  android:id="@+id/_recycler_view"
                  android:layout_width="match_parent"
                  android:nestedScrollingEnabled="false"
                  android:layout_height="wrap_content"
                  android:paddingStart="8dp"
                  android:paddingEnd="8dp"
                  android:scrollbars="vertical" /&gt;
          &lt;/android.support.v7.widget.CardView&gt;
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>My single item:</strong></p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/_container"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
      &lt;ImageView
          android:id="@+id/_icon"
          android:layout_width="44dp"
          android:layout_height="44dp"
          android:layout_marginBottom="8dp"
          android:layout_marginStart="8dp"
          android:layout_marginTop="8dp"
          android:background="@drawable/circle_background"
          android:padding="10dp"
          android:tint="@color/white"
          app:layout_constraintBottom_toTopOf="@+id/_separator"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:srcCompat="@drawable/ic_folder_black_24dp" /&gt;
  
      &lt;TextView
          android:id="@+id/_titolo"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginStart="8dp"
          android:ellipsize="end"
          android:lines="1"
          android:maxLines="1"
          android:text="Titolo"
          android:textAppearance="@android:style/TextAppearance.Material.Body2"
          app:layout_constraintEnd_toStartOf="@+id/_menu"
          app:layout_constraintHorizontal_bias="0.0"
          app:layout_constraintStart_toEndOf="@+id/_icon"
          app:layout_constraintTop_toTopOf="@+id/_icon" /&gt;
  
      &lt;TextView
          android:id="@+id/_dimensione"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:layout_marginStart="8dp"
          android:padding="0dp"
          android:text="dimensione"
          android:ellipsize="end"
          android:lines="1"
          app:layout_constraintBottom_toBottomOf="@+id/_icon"
          app:layout_constraintEnd_toStartOf="@+id/_menu"
          app:layout_constraintHorizontal_bias="0.0"
          app:layout_constraintStart_toEndOf="@+id/_icon"
          app:layout_constraintTop_toBottomOf="@+id/_titolo" /&gt;
  
      &lt;ImageButton
          android:id="@+id/_menu"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginEnd="8dp"
          android:background="@android:color/transparent"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintTop_toTopOf="parent"
          app:srcCompat="@drawable/ic_more_vert_black_24dp" /&gt;
  
      &lt;View
          android:id="@+id/_separator"
          android:layout_width="match_parent"
          android:layout_height="1dp"
          android:layout_marginBottom="0dp"
          android:background="@color/lightGrey"
          app:layout_constraintBottom_toBottomOf="parent" /&gt;
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>In order to update the elements I simply change the list of them and then I notify that to the recycler view.</p>